[issue23185] add inf and nan to math module
STINNER Victor
report at bugs.python.org
Wed Jan 7 17:42:15 CET 2015
STINNER Victor added the comment:
> Do we add a math.neginf, or somesuch, for float('-inf')? Or just use -math.inf?
I would prefer to only add inf.
It looks like float("-inf") and -float("inf") have exactly the same IEEE 754 representation (at least on my x86_64 CPU):
>>> struct.pack("d", float("-inf")) == struct.pack("d", -float("inf"))
True
----------
nosy: +haypo
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23185>
_______________________________________
More information about the Python-bugs-list
mailing list