high precision mathematics

Fernando Pérez fperez528 at yahoo.com
Sat Feb 16 20:26:52 CET 2002


I.J. wrote:

> Is there a module for python that grants ussage of decimal numbers with more
> than 14 decimal places, including all scientific functions to do with those
> numbers?

No. Python uses C doubles underneath, and those give you only 14 places. 
There are, however, python bindings for the Gnu multiple precision libraries 
(google...). You'd have however to implement scientific libraries to use the 
arbitrary precision function calls instead. Not an easy task.

What you're asking for isn't particularly easy to find outside of systems 
like Mathematica which implement their own arithmetic subsystem, and can 
therefore do *any* calculation in arbitrary precision. Matlab, IDL, Octave, 
etc., all are limited to doubles. Designing a generic, arbitrary precision 
scientific library is a massive undertaking.

Cheers,

f.



More information about the Python-list mailing list