Hi Russel, We currently don't have something like a "closeEnough" function. Even though coding up this function is relatively trivial, I believe this would be valuable to include in the standard library as convenience to users.
Based on the amount of thought and effort put into Python's implementation of math.isclose() (c.f. PEP 485), I think it would be ideal to provide a similar interface and implementation. This has the additional bonus of providing Python users something familiar. If you're interested in contributing something like this, possibly starting with your home grown implementation, I'd be happy to help you work out the details and get an implementation in shape for the Math module. Best, Ben On 9/4/16, 2:35 AM, "Russel Winder" <[email protected]> wrote: >I have written my own "closeEnough" function for comparing floating >point numbers (real in this case). Have I just missed the standard >Chapel way of doing this? > >-- >Russel. >============================================================================= >Dr Russel Winder t: +44 20 7585 2200 voip: sip:[email protected] >41 Buckmaster Road m: +44 7770 465 077 xmpp: [email protected] >London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder ------------------------------------------------------------------------------ _______________________________________________ Chapel-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/chapel-users
