diff options
Diffstat (limited to 'libc/test/src/math/acos_test.cpp')
-rw-r--r-- | libc/test/src/math/acos_test.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libc/test/src/math/acos_test.cpp b/libc/test/src/math/acos_test.cpp index 1404887..8678fe6 100644 --- a/libc/test/src/math/acos_test.cpp +++ b/libc/test/src/math/acos_test.cpp @@ -6,11 +6,18 @@ // //===----------------------------------------------------------------------===// +#include "src/__support/macros/optimization.h" #include "src/math/acos.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" +#ifdef LIBC_MATH_HAS_SKIP_ACCURATE_PASS +#define TOLERANCE 8 +#else +#define TOLERANCE 0 +#endif // LIBC_MATH_HAS_SKIP_ACCURATE_PASS + using LlvmLibcAcosTest = LIBC_NAMESPACE::testing::FPTest<double>; namespace mpfr = LIBC_NAMESPACE::testing::mpfr; @@ -46,7 +53,7 @@ TEST_F(LlvmLibcAcosTest, InDoubleRange) { ++count; if (!TEST_MPFR_MATCH_ROUNDING_SILENTLY(mpfr::Operation::Acos, x, result, - 0.5, rounding_mode)) { + TOLERANCE + 0.5, rounding_mode)) { ++fails; while (!TEST_MPFR_MATCH_ROUNDING_SILENTLY(mpfr::Operation::Acos, x, result, tol, rounding_mode)) { |