[all-commits] [llvm/llvm-project] 64af34: [libc] Implement expm1f function that is correctly...
lntue via All-commits
all-commits at lists.llvm.org
Tue Mar 15 07:27:35 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 64af346b185ab3c3c34e145181717350c304b05a
https://github.com/llvm/llvm-project/commit/64af346b185ab3c3c34e145181717350c304b05a
Author: Tue Ly <lntue at google.com>
Date: 2022-03-15 (Tue, 15 Mar 2022)
Changed paths:
M libc/src/math/generic/CMakeLists.txt
M libc/src/math/generic/common_constants.cpp
M libc/src/math/generic/common_constants.h
M libc/src/math/generic/expf.cpp
M libc/src/math/generic/expm1f.cpp
M libc/test/src/math/exhaustive/CMakeLists.txt
M libc/test/src/math/exhaustive/exhaustive_test.cpp
M libc/test/src/math/exhaustive/exhaustive_test.h
M libc/test/src/math/exhaustive/expm1f_test.cpp
M libc/test/src/math/expm1f_test.cpp
Log Message:
-----------
[libc] Implement expm1f function that is correctly rounded for all rounding modes.
Implement expm1f function that is correctly rounded for all rounding modes. This is based on expf implementation.
>From exhaustive testings, using expf implementation, and subtract 1.0 before rounding the final result to single precision
gives correctly rounded results for all |x| > 2^-4 with 1 exception. When |x| < 2^-25, we use x + x^2 (implemented with a
single fma). And for 2^-25 <= |x| <= 2^-4, we use a single degree-8 minimax polynomial generated by Sollya.
Reviewed By: sivachandra, zimmermann6
Differential Revision: https://reviews.llvm.org/D121574
More information about the All-commits
mailing list