PEP 238 (revised)

Bengt Richter bokr at accessone.com
Sat Jul 28 21:19:26 EDT 2001


On 28 Jul 2001 19:40:43 GMT, Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl> wrote:

>Fri, 27 Jul 2001 15:43:24 -0400, Tim Peters <tim.one at home.com> pisze:
>
>> Multiplying by 1.0 preserves the sign of a 754 zero, but adding 0.0
>> (of either sign) may not;
>
UIAM, the way I read it, the only way you can get -0 from multiply is as a
result of extreme underflow denormalizing to zero. Others give plain zero.
Of course, my intel pentium book is not the official ieee754 spec.

>Why adding a negative zero may not? If 0.0+(-0.0) is specified to be
>0.0, then I don't see where it breaks.
>
UIAM some more, the result of 0.0+(-0.0) depends on rounding mode (Down => -0.0)




More information about the Python-list mailing list