[Python-ideas] PEP 485: A Function for testing approximate equality
Chris Barker - NOAA Federal
chris.barker at noaa.gov
Sat Jan 24 02:56:14 CET 2015
> (But I wonder - wouldn't it work better with
> a "symmetrical" close-to function? That's probably a question for
> Chris.)
Well, you usually use Newton's algorithm to find the zero of a
function, so in that case, you'd want an absolute comparison.
But it's pretty common to do a simple iterative solution where you
check convergence by seeing if the new solution is close to the
previous solution, in which case, a symmetric test would probability
be better, but the asymmetric one would be fine -- you'd be asking the
question -- is the new solution close to the previous one?
-Chris
More information about the Python-ideas
mailing list