extend methods of decimal module
casevh at gmail.com
casevh at gmail.com
Thu Feb 20 00:11:12 EST 2014
On Wednesday, February 19, 2014 1:30:13 PM UTC-8, Mark H. Harris wrote:
>
> I guess what I'm really asking for are the same routines found in "bc -l"
> math library. I've finally moved my number crunching stuff to python (from
> bc) because the performance of "decimal" is finally way better than bc for
> the moment, and wrapping python are the math routines for control and
> processing is so much better. Anyway, sure would be nice to have a very
> speedy atan() function built-in for decimal.
>
Have you looked at the gmpy2 ( https://code.google.com/p/gmpy/ ) module?
It supports all the transcendental function available in the MPFR library. I
did a quick performance test of sqrt() and ln() at around 1000 decimal digits.
gmpy2 was about ~200 times faster than the corresponding functions in decimal.
casevh
More information about the Python-list
mailing list