Scott David Daniels <[EMAIL PROTECTED]> 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. -- http://mail.python.org/mailman/listinfo/python-list