diff options
Diffstat (limited to 'pl/math/expm1_2u5.c')
| -rw-r--r-- | pl/math/expm1_2u5.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/pl/math/expm1_2u5.c b/pl/math/expm1_2u5.c index a3faff70cb62..f7d431198614 100644 --- a/pl/math/expm1_2u5.c +++ b/pl/math/expm1_2u5.c @@ -5,7 +5,7 @@ * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception */ -#include "estrin.h" +#include "poly_scalar_f64.h" #include "math_config.h" #include "pl_sig.h" #include "pl_test.h" @@ -14,14 +14,14 @@ #define Ln2hi 0x1.62e42fefa39efp-1 #define Ln2lo 0x1.abc9e3b39803fp-56 #define Shift 0x1.8p52 -#define TinyBound \ - 0x3cc0000000000000 /* 0x1p-51, below which expm1(x) is within 2 ULP of x. */ -#define BigBound 0x1.63108c75a1937p+9 /* Above which expm1(x) overflows. */ -#define NegBound -0x1.740bf7c0d927dp+9 /* Below which expm1(x) rounds to 1. */ +/* 0x1p-51, below which expm1(x) is within 2 ULP of x. */ +#define TinyBound 0x3cc0000000000000 +/* Above which expm1(x) overflows. */ +#define BigBound 0x1.63108c75a1937p+9 +/* Below which expm1(x) rounds to 1. */ +#define NegBound -0x1.740bf7c0d927dp+9 #define AbsMask 0x7fffffffffffffff -#define C(i) __expm1_poly[i] - /* Approximation for exp(x) - 1 using polynomial on a reduced interval. The maximum error observed error is 2.17 ULP: expm1(0x1.63f90a866748dp-2) got 0x1.a9af56603878ap-2 @@ -65,7 +65,7 @@ expm1 (double x) and assemble the approximation expm1(f) ~= f + f^2 * P(f). */ double f2 = f * f; double f4 = f2 * f2; - double p = fma (f2, ESTRIN_10 (f, f2, f4, f4 * f4, C), f); + double p = fma (f2, estrin_10_f64 (f, f2, f4, f4 * f4, __expm1_poly), f); /* Assemble the result, using a slight rearrangement to achieve acceptable accuracy. @@ -78,8 +78,7 @@ expm1 (double x) PL_SIG (S, D, 1, expm1, -9.9, 9.9) PL_TEST_ULP (expm1, 1.68) -PL_TEST_INTERVAL (expm1, 0, 0x1p-51, 1000) -PL_TEST_INTERVAL (expm1, -0, -0x1p-51, 1000) +PL_TEST_SYM_INTERVAL (expm1, 0, 0x1p-51, 1000) PL_TEST_INTERVAL (expm1, 0x1p-51, 0x1.63108c75a1937p+9, 100000) PL_TEST_INTERVAL (expm1, -0x1p-51, -0x1.740bf7c0d927dp+9, 100000) PL_TEST_INTERVAL (expm1, 0x1.63108c75a1937p+9, inf, 100) |
