This math scares me
Andrew Koenig
ark at research.att.com
Mon Mar 12 22:25:39 EST 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 research.att.com, http://www.research.att.com/info/ark
More information about the Python-list
mailing list