math module for Decimals

Steve Holden steve at
Mon Dec 29 17:22:17 CET 2008

Raymond L. Buvel wrote:
> Since the interest is more in extended precision than in decimal
> representation, there is another module that may be of interest.
> It interfaces to the Class Library for Numbers (CLN) library to provide
> both arbitrary precision floating point and complex floating point
> numbers and the usual math functions.
> While I am the author of this module, I agree with Mark that a module
> based on MPFR would be better since you have better control over
> precision and rounding.
> I have looked at Sage (which uses MPFR) but it is a huge integrated
> package so you can't just import what you need into one of your usual
> Python scripts.
> I wrote the clnum module mainly to support arbitrary precision in an RPN
> calculator available from the same SourceForge project.  However, it
> also works nicely as a stand-alone module.
> At this time, there is no Windows installer available for Python 2.6
> because I don't use Windows at home and the person who normally builds
> the installer for me is no longer interested.  If someone wants to
> follow the published instructions and send me the resulting installer, I
> will put it up on SourceForge.
I'm not sure why nobody has mentioned gmpy, except possibly because it
advertises its alpha status and doesn't have many active developers.

Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC    

More information about the Python-list mailing list