This math scares me

Andrew Koenig ark at
Tue Mar 13 04:25:39 CET 2001

John> Many of us feel that the present truthful display is correct, and the 
John> former (before Python 2) display of 10.55 was wrong because it was a lie 
John> (some don't feel quite *that* strongly about it but still prefer the new 
John> form).

I'm curious -- Does Python now follow either the IEEE or the more
restrictive Scheme rules for floating-point conversion?

Briefly, IEEE requires that input and output conversion have no more
than 0.47 LSB error; Scheme requires that input conversion be exact
(that is, that the internal representation always be the closest
(according to the rounding rules currently in effect) internal number
to the infinite-precision value read, and that output yield the
smallest number of significant digits necessary for idempotence).

Andrew Koenig, ark at,

More information about the Python-list mailing list