<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 25 February 2017 at 12:43, Nathaniel Smith <span dir="ltr"><<a href="mailto:njs@pobox.com" target="_blank">njs@pobox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><span class="gmail-"></span><div dir="auto">FWIW, numpy provides all of the following as separate functions:</div><div dir="auto"><br></div><div dir="auto"><span style="font-family:sans-serif">* an isclose equivalent</span><br></div><div dir="auto">* nextafter</div><div dir="auto">* a function for counting the number of ulps between two floats</div><div dir="auto">* a function for checking that two floats differ by at most N ulps</div></div></blockquote><div><br>"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.<br clear="all"> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"></div><div dir="auto">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.</div></div></blockquote><br></div><div class="gmail_quote">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.<br><br></div><div class="gmail_quote">Cheers,<br></div><div class="gmail_quote">Nick.<br></div><br>-- <br><div class="gmail_signature">Nick Coghlan | <a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a> | Brisbane, Australia</div>
</div></div>