This math scares me

Neelakantan Krishnaswami neelk at alum.mit.edu
Tue Mar 13 08:26:50 EST 2001


On Tue, 13 Mar 2001 03:25:39 GMT, Andrew Koenig <ark at research.att.com> wrote:
>
>> Many of us feel that the present truthful display is correct, and the 
>> former (before Python 2) display of 10.55 was wrong because it was a lie 
>> (some don't feel quite *that* strongly about it but still prefer the new 
>> form).
>
> I'm curious -- Does Python now follow either the IEEE or the more
> restrictive Scheme rules for floating-point conversion?

Python uses whatever the underlying (usually C) platform provides. It
used to do rounding on the output, and now it doesn't. If you wanted
to implement the algorithms in William Clinger's _Reading Floating
Point Numbers Accurately_ and Byrger and Dybvig's _Printing Floating
Point Numbers Quickly and Accurately_ and submit it as a patch I don't
think anyone would object. :)


Neel



More information about the Python-list mailing list