[issue6675] inf == inf (wrong IEEE 754 behaviour)
Tim Peters
report at bugs.python.org
Mon Aug 10 16:06:05 CEST 2009
Tim Peters <tim.peters at gmail.com> added the comment:
+inf == +inf, and -inf == -inf, are required by the 754 standard.
However, +inf - +inf, and -inf - -inf, are required (by the same
standard) to signal invalid operation and, if that signal is masked (as
it is in Python), to return a NaN. Then NaN == x is false for any value
of x (including a NaN).
OTOH, +inf != -inf, +inf - -inf == +inf, and -inf - +inf == -inf.
Current versions of Python implement all of that.
----------
nosy: +tim_one
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6675>
_______________________________________
More information about the Python-bugs-list
mailing list