bpo-26121: Use C library implementation for math functions: (#515)

* bpo-26121: Use C library implementation for math functions:
tgamma(), lgamma(), erf() and erfc().

* Don't use tgamma() and lgamma() from libc on OS X.
3 files changed