diff --git a/src/mlpack/tests/test_tools.hpp b/src/mlpack/tests/test_tools.hpp index 2d4e56e235..77fd1c189b 100644 --- a/src/mlpack/tests/test_tools.hpp +++ b/src/mlpack/tests/test_tools.hpp @@ -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