Anton81 wrote:
> Hi!
>
> 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
> it?
>
> e.g. "if f1==f2:" will always mean "if abs(f1-f2)<1e-6:"
>
> Anton

googled for "floating point" "comparison tolerance"
http://www.boost.org/libs/test/doc/components/test_tools/floating_point_comparison.html

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to