"Thomas Lemaire"
dear list,
When executing a test defined by: BOOST_CHECK_CLOSE(t3.x(3), 0.0, epsilon);
I get the message: difference between t3.x(3){2.34188e-17} and 0.0{0} exceeds 1e-08%
where obviously the difference does not exceeds the given threshold 1e-08...
What's going on ?
-- thomas
I really should put this into FAQ section. This was discussed several times. The explanation lies in a fact that Boost.Test uses different algorithm (from the one you implicitly assumed) for FP values comparisons. Look into docs for more details. In this algorithm no value (but zero itself) is close enough to zero. I plan to implement BOOST_CHECK_SMALL macro that should be used instead for the checks like above. Be aware though that it may not be what you really want. Gennadiy