Precision for equality of two floats?
gene.tani at gmail.com
Tue Nov 29 16:41:33 CET 2005
> When I do simple calculation with float values, they are rarely exactly
> equal even if they should be. What is the threshold and how can I change
> e.g. "if f1==f2:" will always mean "if abs(f1-f2)<1e-6:"
googled for "floating point" "comparison tolerance"
More information about the Python-list