diff options
Diffstat (limited to 'libc/test/src/math/exp2m1f_test.cpp')
-rw-r--r-- | libc/test/src/math/exp2m1f_test.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libc/test/src/math/exp2m1f_test.cpp b/libc/test/src/math/exp2m1f_test.cpp index 7e9f6b5..16b20d7 100644 --- a/libc/test/src/math/exp2m1f_test.cpp +++ b/libc/test/src/math/exp2m1f_test.cpp @@ -7,15 +7,21 @@ //===----------------------------------------------------------------------===// #include "hdr/math_macros.h" +#include "hdr/stdint_proxy.h" #include "src/__support/CPP/array.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/libc_errno.h" +#include "src/__support/macros/optimization.h" #include "src/math/exp2m1f.h" #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include "hdr/stdint_proxy.h" +#ifdef LIBC_MATH_HAS_SKIP_ACCURATE_PASS +#define TOLERANCE 1 +#else +#define TOLERANCE 0 +#endif // LIBC_MATH_HAS_SKIP_ACCURATE_PASS using LlvmLibcExp2m1fTest = LIBC_NAMESPACE::testing::FPTest<float>; @@ -39,7 +45,7 @@ TEST_F(LlvmLibcExp2m1fTest, TrickyInputs) { for (float x : INPUTS) { EXPECT_MPFR_MATCH_ALL_ROUNDING(mpfr::Operation::Exp2m1, x, - LIBC_NAMESPACE::exp2m1f(x), 0.5); + LIBC_NAMESPACE::exp2m1f(x), TOLERANCE + 0.5); } } |