diff options
author | Joe Ramsay <Joe.Ramsay@arm.com> | 2022-07-14 11:41:37 +0100 |
---|---|---|
committer | Joe Ramsay <joe.ramsay@arm.com> | 2022-07-14 11:41:37 +0100 |
commit | 8c77ce82dc4920d660e6814367c553a02f14b408 (patch) | |
tree | f73bbb3fc766d92fe45d5ce2276bf867e5f17308 /pl/math/log1pf_data.c | |
parent | c6e5af7d30eb825f53ec7596021f7237a0ca23e3 (diff) | |
download | arm-optimized-routines-8c77ce82dc4920d660e6814367c553a02f14b408.tar.gz |
pl/math: Add scalar log1pf
The new routine uses a polynomial on a reduced interval. Worst-case
error is about 2.1 ULP, with an option in math_config.h to use Horner
instead of Estrin for the polynomial, which gives worst-case error of
1.3 ULP.
Diffstat (limited to 'pl/math/log1pf_data.c')
-rw-r--r-- | pl/math/log1pf_data.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pl/math/log1pf_data.c b/pl/math/log1pf_data.c new file mode 100644 index 0000000..d7bc95c --- /dev/null +++ b/pl/math/log1pf_data.c @@ -0,0 +1,14 @@ +/* + * Data used in single-precision log1p(x) function. + * + * Copyright (c) 2022, Arm Limited. + * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception + */ +#include "math_config.h" + +/* Polynomial coefficients generated using floating-point minimax + algorithm, see tools/log1pf.sollya for details. */ +const struct log1pf_data __log1pf_data + = {.coeffs = {-0x1p-1f, 0x1.5555aap-2f, -0x1.000038p-2f, 0x1.99675cp-3f, + -0x1.54ef78p-3f, 0x1.28a1f4p-3f, -0x1.0da91p-3f, 0x1.abcb6p-4f, + -0x1.6f0d5ep-5f}}; |