[issue46173] float(x) with large x not raise OverflowError
Mark Dickinson
report at bugs.python.org
Fri Dec 24 12:15:57 EST 2021
Mark Dickinson <dickinsm at gmail.com> added the comment:
If we wanted to make a change, I think the part of the docs that I'd target would be this sentence:
> a floating point number with the same value (within Python’s floating point precision) is returned
It's that "same value (within Python's floating point precision)" bit that I'd consider changing. We could consider replacing it with something along the lines that "an integer argument is rounded to the nearest float", possibly with an additional note that under the assumption of IEEE 754 binary64 format, we follow the usual IEEE 754 rules.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46173>
_______________________________________
More information about the Python-bugs-list
mailing list