[all-commits] [llvm/llvm-project] 4e5f8b: [libc] Add implementation of expm1f.
lntue via All-commits
all-commits at lists.llvm.org
Thu Jun 10 12:05:11 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4e5f8b4d8d9d7a6039e10b9507dac896eed92040
https://github.com/llvm/llvm-project/commit/4e5f8b4d8d9d7a6039e10b9507dac896eed92040
Author: Tue Ly <lntue at google.com>
Date: 2021-06-10 (Thu, 10 Jun 2021)
Changed paths:
M libc/config/linux/aarch64/entrypoints.txt
M libc/config/linux/x86_64/entrypoints.txt
M libc/spec/stdc.td
M libc/src/math/CMakeLists.txt
A libc/src/math/expm1f.h
M libc/src/math/generic/CMakeLists.txt
A libc/src/math/generic/expm1f.cpp
M libc/test/src/math/CMakeLists.txt
M libc/test/src/math/differential_testing/CMakeLists.txt
A libc/test/src/math/differential_testing/expm1f_diff.cpp
A libc/test/src/math/differential_testing/expm1f_perf.cpp
M libc/test/src/math/exhaustive/CMakeLists.txt
A libc/test/src/math/exhaustive/expm1f_test.cpp
A libc/test/src/math/expm1f_test.cpp
M libc/utils/FPUtil/BitPatterns.h
M libc/utils/FPUtil/CMakeLists.txt
A libc/utils/FPUtil/PolyEval.h
M libc/utils/FPUtil/generic/FMA.h
M libc/utils/MPFRWrapper/MPFRUtils.cpp
M libc/utils/MPFRWrapper/MPFRUtils.h
A libc/utils/mathtools/expm1f.sollya
Log Message:
-----------
[libc] Add implementation of expm1f.
Use expm1f(x) = exp(x) - 1 for |x| > ln(2).
For |x| <= ln(2), divide it into 3 subintervals: [-ln2, -1/8], [-1/8, 1/8], [1/8, ln2]
and use a degree-6 polynomial approximation generated by Sollya's fpminmax for each interval.
Errors < 1.5 ULPs when we use fma to evaluate the polynomials.
Differential Revision: https://reviews.llvm.org/D101134
More information about the All-commits
mailing list