[issue24270] PEP 485 (math.isclose) implementation
Tal Einat
report at bugs.python.org
Thu May 28 20:52:09 CEST 2015
Tal Einat added the comment:
@Stefan K.: I tend to agree, but still think that's a separate issue. math.isclose() certainly shouldn't be checking the type of its arguments.
While we're on the subject, though, trying to convert a very large int to float fails with an OverflowError. Perhaps Decimal should do the same?
>>> float(10**999)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: int too large to convert to float
>>> math.isclose(10**999, 10**400000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: int too large to convert to float
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24270>
_______________________________________
More information about the Python-bugs-list
mailing list