[Pyrex] special floats generate incorrect C code when used as compile-time constants
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Apr 26 00:07:12 CEST 2008
Stefan Behnel wrote:
> As of 2.6, float('inf') and float('nan') will be guaranteed to work
Does it also provide a way of testing whether a value
is an inf or nan?
I tried this on MacOSX using 2.3:
>>> x = float('nan')
>>> y = float('nan')
>>> x == y
True
But isn't that wrong? Aren't nans supposed to compare
unequal to anything else, including themselves? What
does 2.6 do here?
--
Greg
More information about the Pyrex
mailing list