Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

I agree, "nextafter" is so widely used it's probably pointless to fight against 
the name :-)

Mark: "IEEE 754, on the other hand, requires instead nextUp and nextDown".

I know Wikipedia isn't a primary source, but it says IEEE 754 recommends 
nextafter(x, y).

My understanding of IEEE-754 is that the functionality is required, not the 
specific API. That is, it's not required to have literally two functions called 
"nextUp" and "nextDown", so long as you can get the next larger and next 
smaller float.

I think the second argument should also be optional, so that nextafter(x) 
returns the next representable float.

----------
nosy: +steven.daprano

_______________________________________
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