[Python-Dev] Floating-point implementations

Steve Holden steve at holdenweb.com
Wed Dec 10 16:46:55 CET 2008

Lie Ryan wrote:
> On Tue, 09 Dec 2008 12:15:53 -0500, Steve Holden 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?
>> regards
>>  Steve
> Why don't we create a DecimalFloat datatype which is a variable-width 
> floating point number. Decimal is variable precision fixed-point number, 
> while the plain ol' float would be system dependent floating point.
Because it's a large amount of work? For a limited return ... the
implementation is bound to be hugely slow compared with hardware
floating point, and as Martin already pointed out gmpy provides
higher-precision arithmetic where required, and the Decimal module
provides arbitrary-range fixed-point arithmetic.

Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/

More information about the Python-Dev mailing list