Use absolute value when considering relative error.

This commit is contained in:
MarcosPividori
2016-06-22 15:09:07 -03:00
parent 7f68a278d9
commit 7f4dfd005a
+1 -1
View File
@@ -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