[Python-Dev] PyObject_RichCompareBool identity shortcut
Alexander Belopolsky
alexander.belopolsky at gmail.com
Wed Apr 27 17:43:49 CEST 2011
On Wed, Apr 27, 2011 at 10:53 AM, Guido van Rossum <guido at python.org> wrote:
..
> Maybe we should just call off the odd NaN comparison behavior?
+1
There was a long thread on this topic last year:
http://mail.python.org/pipermail/python-dev/2010-March/098832.html
I was trying to find a rationale for non-reflexivity of equality in
IEEE and although it is often mentioned that this property simplifies
some numerical algorithms, I am yet to find an important algorithm
that would benefit from it. I also believe that long history of
suboptimal hardware implementations of nan arithmetics has stifled the
development of practical applications.
High performance applications that rely on non-reflexivity will still
have an option of using ctypes.c_float type or NumPy.
More information about the Python-Dev
mailing list