I'm using the Boost::Test library, and I am trying to check if an actual percent value is close to the expected value:
BOOST_CHECK_CLOSE_FRACTION(
items[i].ExpectedPercent,
items[i].ActualCount / totalCount,
0.05);
For some reason this check fails even when the values are close enough:
difference between items[i].ExpectedPercent{0.40000000000000002}
and items[i].ActualCount / totalReturned{0.42999999999999999}
exceeds 0.050000000000000003
Is this a problem with Boost or a problem with how I am using Boost?