On Wed, 2016-09-07 at 18:10 +0000, Ben Albrecht wrote: > 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.
Unsurprisingly, my Chapel code is not that dissimilar to the Python code implied by the PEP-485 API: for scalar testing the issues are well understood, and well expressed in PEP-485. Given I am using isclose in Python tests, I suspect I have simply been influenced by it. :-) The actually interesting problem is the vector version as in NumPy. Given Chapel's focus on whole array operations, this variant of isclose is important. What is the right way of progressing this? I am assuming a temporary Git repository on GitHub. -- 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
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------------
_______________________________________________ Chapel-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/chapel-users
