Syntax across languages
Alex Martelli
aleaxit at yahoo.com
Sun Oct 23 20:37:16 EDT 2005
Tom Anderson <twic at urchin.earth.li> wrote:
...
> What would approximate FP equality even mean? How approximate?
In APL, it meant "to within [a certain quad-global whose name I don't
recall] in terms of relative distance", i.e., if I recall correctly,
"a=b" meant something like "abs(a-b)/(abs(a)+abs(b)) < quadEpsilon" or
thereabouts. Not too different from Numeric.allclose, except the latter
is "richer" (it takes both absolute and relative "epsilons", and also
implies an "and-reduce" if the objects being compared are arrays).
Alex
More information about the Python-list
mailing list