x.replace(x, y) -> y
sympify replace input
Merge pull request #2118 from smichr/replace

x.replace(x, y) -> y
Merge pull request #2122 from smichr/replace

sympify replace input
refactor the Miller-Rabin test code

also use pow(b, 2, n) rather than b**2 % n which is a bit more efficient
Fix srepr(Function) for non-undefined Functions

Now srepr(sin(x)) gives sin(Symbol('x')) instead of
Function('sin')(Symbol('x')).
use ZZ(base) in isprime
Merge pull request #2119 from smichr/isprime

refactor the Miller-Rabin test code
Merge pull request #2123 from asmeurer/srepr_Function

Fix srepr(Function) for non-undefined Functions
Fix depredcated "in" for binomial expansion.
Address review comment
Add a test
Merge pull request #2125 from raoulb/fix_3831

Fix deprecated "in" for binomial expansion.
Merge branch 'master' into trig
exptrigsimp recognizes tan and tanh
use TR2i to do -> tan/tanh
remove numerical testing scaffolding