>I could probably prohibit usage of CHECK_CLOSE with number of rounding
>errors provided.
>Is there any other general recommendations how to choose the tolerance to
>FP computation correctness checking?
There has been some recent discussion on comp.lang.c++.moderated, subject "equality of two doubles". The last post was from Andrei Alexandrescu:
>What's most of the time needed is relative precision. > >So, numerical gurus: how can one express "a equals b within 0.1%" over >the whole range of floating point numbers? If that can be done, it would >be a nice useful routine. > >bool approximately_equal(double lhs, double rhs, double relative_prec) >{ > // fill in here please :o) >}
But it really doesn't seem that a test library is the right home for such functions. I think all the fp stuff should be removed from Boost.Test, and passed on as a challenge to the numerics experts.
After all, the user can always write:
BOOST_CHECK( approximately_equal(...) );
--Beman
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost