P
prouleau001
Hi all,
While trying to use simplejson under Python 2.4.3 I have been
investigating the handling of special floating point values and found
that both Python 2.4 and 2.5 return False when comparing a NaN with
itself. Although surprising, I imagine it could also be correct since
NaN is not a number. But is it correct?
Notice the result of comparing c with itself in the following Python
2.5 session (it works the same on Python 2.4.3) under Win32::
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Thanks,
While trying to use simplejson under Python 2.4.3 I have been
investigating the handling of special floating point values and found
that both Python 2.4 and 2.5 return False when comparing a NaN with
itself. Although surprising, I imagine it could also be correct since
NaN is not a number. But is it correct?
Notice the result of comparing c with itself in the following Python
2.5 session (it works the same on Python 2.4.3) under Win32::
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Thanks,