float: tighten up almost_equal tolerance
This commit is contained in:
parent
cf5a682959
commit
6bf011efa4
@ -97,7 +97,7 @@ bool
|
||||
ieee_float<E, S>::almost_equal (floating_t a,
|
||||
floating_t b)
|
||||
{
|
||||
return almost_equal (a, b, 10000);
|
||||
return almost_equal (a, b, 10000u);
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,6 +26,10 @@ main (int, char **) {
|
||||
CHECK (almost_equal (0.f, -0.f));
|
||||
CHECK (almost_equal (0., -0.));
|
||||
|
||||
CHECK ( almost_zero (1e-45f));
|
||||
CHECK (!almost_zero (1e-40f));
|
||||
CHECK (!exactly_zero (1e-45f));
|
||||
|
||||
CHECK_EQ (min (-2, 0, 2), -2);
|
||||
CHECK_EQ (max (-2, 0, 2), 2);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user