On 25 February 2017 at 12:43, Nathaniel Smith <n...@pobox.com> wrote:

> FWIW, numpy provides all of the following as separate functions:
>
> * an isclose equivalent
> * nextafter
> * a function for counting the number of ulps between two floats
> * a function for checking that two floats differ by at most N ulps
>

"Does NumPy offer it?" is a useful data point when asking "Is this feature
useful for numerical analysis?", so it'd helpful to know that it does have
them.


> I'm not enough of an expert on numerical analysis to have an opinion on
> how useful these would be for Python itself. They certainly are part of a
> complete IEEE754 implementation, and useful for exploring the details of
> how floats work, if nothing else.
>

It seems like a reasonable thing to expose to me, rather than asking folks
to derive their own equivalents based on the information in sys.float_info.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to