extend methods of decimal module

Mark H. Harris harrismh777 at gmail.com
Wed Feb 19 10:30:19 EST 2014


Would it be possible to extend the methods of the decimal module just a bit to include atan(), sin(), cos(), and exp() ?

The module has methods for ln() and sqrt(); and that's great!

I have done some rudimentary searching of the pep history and I'm not finding any pep related to extending the decimal module with other scientific functions.

It is easy to write them in pure python, of course, but I am interested in having the same performance boost with atan(), sin(), cos(), and exp() as I see with the rest of the decimal module on 3.3/  Is it possible anytime sooner than later?

By-the-by, my hat is off to the person(s) who did the 3.3 work on the decimal module --- the performance boost is astounding.  My agm routine for pi100k (which runs on 3.2.3 2Ghz in 10.5 minutes) runs on the same processor in 42 seconds on 3.3.4/  very nice.





More information about the Python-list mailing list