[issue39310] Add math.ulp(x): unit in the last place

STINNER Victor report at bugs.python.org
Sun Jan 12 12:45:51 EST 2020


STINNER Victor <vstinner at python.org> added the comment:

See also math.isclose() and its PEP 485 which mentions ULP (Unit in the Last Place)... in the "Inappropriate uses" section :-)

* https://docs.python.org/dev/library/math.html#math.isclose
* https://www.python.org/dev/peps/pep-0485/#inappropriate-uses

Extract of an old python-ideas discussion on adding nextafter():

"It's also a little weird to jump from nextafter to isclose, since AFAIK
they have pretty much non-overlapping use cases..."

https://mail.python.org/pipermail/python-ideas/2017-February/044832.html

Other links:

* https://en.wikipedia.org/wiki/Unit_in_the_last_place
* https://en.wikipedia.org/wiki/Machine_epsilon
* https://en.wikipedia.org/wiki/IEEE_754

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39310>
_______________________________________


More information about the Python-bugs-list mailing list