[Python-ideas] PEP 485: A Function for testing approximate equality (original) (raw)
Ron Adam ron3200 at gmail.com
Thu Feb 5 20:08:52 CET 2015
- Previous message: [Python-ideas] PEP 485: A Function for testing approximate equality
- Next message: [Python-ideas] PEP 485: A Function for testing approximate equality
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I meant for this not to send... LOL.
But since it did..
2)
abs(a-b) <= tol * max( abs(a), abs(b) )
3)
abs(a-b) <= tol * min( abs(a), abs(b) )
> 2)
(abs(a-b) <= tol*abs(a)) or (abs(a-b) <= tol*abs(a))
I think the last 'a' should be a 'b'?
> 3)
(abs(a-b) <= tol*abs(a)) and (abs(a-b) <= tol*abs(a))
Same here?
Yes, I think they both should be 'b'. Otherwise both sides are the same.
-Ron
- Previous message: [Python-ideas] PEP 485: A Function for testing approximate equality
- Next message: [Python-ideas] PEP 485: A Function for testing approximate equality
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]