in reply to Re^2: Equality checking for strings AND numbers
in thread Equality checking for strings AND numbers
I'd argue that if you're bothering to mention precision at all, then 10.0 != 10.00.
10.0 is really "somewhere between 9.95 and 10.05", and 10.00 is really "somewhere between 9.995 and 10.005". So if your 10.0 is really 9.97, it can't possibly be equal to 10.00.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Equality checking for strings AND numbers
by Anonymous Monk on Jul 17, 2007 at 12:05 UTC |