New implementation of mantle_api::AlmostEqual() yields unexpected result
Hi,
The mantle_api::IsEqual()
method was updated and renamed to mantle_api::AlmostEqual()
in Common/floating_point_helper.h with this commit.
The following assertion :
static_assert(!AlmostEqual(1000.0, 1000.1, 0.05));
fails when added inside test/MantleAPI/Common/floating_point_helper_test.cc.
In other words, AlmostEqual(1000.0, 1000.1, 0.05)
returns true
, when I would expect it not to.
This is an unexpected result given the method's name, and is inconsistent with the previous implementation.
The assertion seems to fail no matter the tolerance value, as long as it is positive and inferior to the absolute difference of lhs
and rhs
.
This is currently breaking a lot of our tests and blocking further feature integrations. Could you please have a look at it ?
Thank you