pickle broken: can't handle NaN or Infinity under win32

Paul Rubin http
Thu Jun 23 02:42:22 CEST 2005


Scott David Daniels <Scott.Daniels at Acm.Org> writes:
> >>>Negative 0 isn't a NaN, it's just negative 0.
> >>
> >>Right, but it is hard to construct in standard C.
> > Huh?  It's just a hex constant.
> Well, -0.0 doesn't work, and (double)0x80000000 doesn't work,
> and.... I think you have to use quirks of a compiler to create
> it.  And I don't know how to test for it either, x < 0.0 is
> not necessarily true for negative 0.

Aren't we talking about IEEE 754 arithmetic?  There's some specific
bit pattern(s) for -0.0 and you can assign a float variable to 
such a pattern.



More information about the Python-list mailing list