STINNER Victor <vstin...@python.org> added the comment:

PR 17937 is ready to be reviewed. The tests passed on the regular CIs and 
buildbots: good.

> That last assumes you want -0 and +0 to act differently

It is the case: I wrote an unit test checking exactly that, and it works as 
expected on all platforms (Windows, macOS, Linux, Intel, PPC, etc.).

> `nextafter()` is too widely implemented to fight against, despite the sucky 
> name ;-)

nexttoward name is less ambiguous, but as you all said: "nextafter" name is way 
more popular. Honestly, it's not that hard to infer that the function can go 
"up" or "down" because it has a second parameter. If it's not obvious enough, 
maybe we can enhance the documentation.

--

About Wikipedia, the following articles are interesting for the ones like me 
who don't fully understand IEEE 754, rounding mode, etc.

* 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 <rep...@bugs.python.org>
<https://bugs.python.org/issue39288>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to