PEP 238 (revised)

James Logajan JamesL at Lugoj.Com
Fri Jul 27 18:51:54 EDT 2001


Tim Peters wrote:
> The issue in context is about floats, and the sign bit of 0.0 follows very
> specific rules under standard IEEE-754 arithmetic.  Multiplying by 1.0
> preserves the sign of a 754 zero, but adding 0.0 (of either sign) may not;
> so adding 0.0 as a means to convert to float is wrong under 754 arithmetic
> rules, albeit subtly wrong.

Obviously I'm not familiar with IEEE-754 arithmetic. Is the intent to do
IEEE-754 FP arithmetic on all platforms when FP is involved? What if the
underlying hardware isn't conformant? Sorry, since this seems to be going
through the python-list mailing list, the "References:" header isn't being
included for some reason, so I missed the introduction of IEEE-754 into the
discussion. Can't find it mentioned in that PEP (unless it is in another PEP
or is documented elsewhere).



More information about the Python-list mailing list