Use absolute value when considering relative error.
This commit is contained in:
@@ -37,6 +37,6 @@
|
||||
// Require the approximation L to be within a relative error of E respect to the
|
||||
// actual value R.
|
||||
#define REQUIRE_RELATIVE_ERR( L, R, E ) \
|
||||
BOOST_REQUIRE_LE( abs((R) - (L)), (E) * (R))
|
||||
BOOST_REQUIRE_LE( abs((R) - (L)), (E) * abs(R))
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user