[Python-Dev] Floating-point implementations

Mark Dickinson dickinsm at gmail.com
Tue Dec 9 18:24:44 CET 2008


On Tue, Dec 9, 2008 at 5:15 PM, Steve Holden <steve at holdenweb.com> wrote:
> Is anyone aware of any implementations that use other than 64-bit
> floating-point? I'd be particularly interested in any that use greater
> precision than the usual 56-bit mantissa. Do modern 64-bit systems
> implement anything wider than the normal double?

I don't know of any.  There are certainly places in the codebase that
assume 56 bits are enough.  (I seem to recall it's something like
56 bits for IBM, 53 bits for IEEE 754, 48 for Cray, and 52 or 56 for VAX.)

Many systems have a "long double" type, which usually seems to
be either 80-bit (with a 64-bit mantissa) or 128-bit.  The latter is
sometimes implemented as a pair of doubles, effectively giving
a 106-bit mantissa, and sometimes as an IEEE extended precision
type;  I don't know how many bits the mantissa would have in that
case, but surely not more than 117.

I asked a related question a while ago:

http://mail.python.org/pipermail/python-dev/2008-February/076680.html

Mark


More information about the Python-Dev mailing list