python decimal library v0.3 released

Stefan Krah stefan at
Tue Mar 4 22:35:48 CET 2014

[I found this via the python-ideas thread]

Wolfgang Maier <wolfgang.maier <at>> writes:
> math.factorial is accurate and faster than your pure-Python function,
especially for large numbers.

It is slower for huge numbers than decimal if you use this
Python function:

Be sure to set MAX_EMAX and MIN_EMIN, that's missing in the example.

If you want to *see* all digits of a very large number, then decimal is
probably even faster than gmpy. See:

Stefan Krah

More information about the Python-list mailing list