[SciPy-user] help with precision for big numbers
Tue May 13 09:28:56 CDT 2008
Received from Damian Eads on Tue, May 13, 2008 at 05:32:33AM EDT:
> The limit of precision of floating point numbers in native Python is
> 32-bit. Numpy defines extra scalar types and you will find most of the
> ones supported by your machine in the numpy package. np.float64 will
> give you 64-bit precision. There is a np.float96 for 96-bit floats but
> I've never used it before.
128-bit floats are also available on certain machines.
Although it isn't as fast as similar packages, mpmath is useful if one
occasionally needs to handle arbitrary precision in Python -
especially considering that it provides a number of special functions
(like gamma and factorial) apart from the usual transcendentals:
More information about the SciPy-user