![]() |
Home | Libraries | People | FAQ | More |
BOOST_
level
_CLOSE_FRACTION(
lhs
,
rhs
, tolerance
)
compares the two floating-point arguments and considers them equal if they
agree within the given tolerance
. The tolerance
is given as a percentage.
BOOST_AUTO_TEST_CASE(example_close_fraction) { BOOST_REQUIRE_CLOSE_FRACTION(100.f, 100.9f, 1.f); BOOST_REQUIRE_CLOSE_FRACTION(100.f, 99.1f, 1.f); }