llvm-capstone/libc
Tue Ly 6168b42225 [libc] Improve the performance of expf.
Reduce the polynomial's degree from 7 down to 4.

Currently we use a degree-7 minimax polynomial on an interval of length 2^-7
around 0 to compute `expf`. Based on the suggestion of @santoshn and the RLIBM
project (https://github.com/rutgers-apl/rlibm-all/blob/main/source/float/exp.c)
and the improvement we made with `exp2f` in https://reviews.llvm.org/D122346,
it is possible to have a good polynomial of degree-4 on a subinterval of length
2^(-7) to approximate e^x.

We did try to either reduce the degree of the polynomial down to 3 or increase
the interval size to 2^(-6), but in both cases the number of exceptional values
exploded. So we settle with using a degree-4 polynomial of the interval of
size 2^(-7) around 0.

Reviewed By: sivachandra, zimmermann6, santoshn

Differential Revision: https://reviews.llvm.org/D122418
2022-03-25 12:20:20 -04:00
..
AOR_v20.02 Harmonize Python shebang 2020-07-16 21:53:45 +02:00
benchmarks Reapply "[cmake] Prefix gtest and gtest_main with "llvm_"." 2022-03-04 13:45:43 -08:00
cmake/modules [libc] Use real objects and archives in integration tests. 2022-03-24 07:02:33 +00:00
config [libc] Add implementations of fopen, flose, fread, fwrite and fseek. 2022-03-24 04:20:12 +00:00
docs [libc] Rename libc-integration-test to libc-api-test. 2022-03-23 20:25:34 +00:00
fuzzing [libc][NFC] split standalone_cpp into single headers 2022-03-08 11:56:08 -08:00
include [libc] Add implementation of POSIX lseek function. 2022-03-15 16:24:48 +00:00
lib [libc] add malloc funcs as external entrypoints 2021-10-27 10:21:01 -07:00
loader [libc] Use real objects and archives in integration tests. 2022-03-24 07:02:33 +00:00
spec [libc] Add implementations of fopen, flose, fread, fwrite and fseek. 2022-03-24 04:20:12 +00:00
src [libc] Improve the performance of expf. 2022-03-25 12:20:20 -04:00
test [libc] Improve the performance of expf. 2022-03-25 12:20:20 -04:00
utils [libc] Add a new rule add_integration_test. 2022-03-23 20:57:29 +00:00
.clang-tidy [libc] Add a naming rule for global constants. 2022-01-19 22:11:16 +00:00
.gitignore [libc][Obvious] Add build folder to .gitignore. 2022-03-04 13:16:55 -05:00
CMakeLists.txt [libc] Add LLVM_LIBC_CLANG_TIDY option and allow LLVM_LIBC_ENABLE_LINTING without full build. 2022-03-01 11:04:29 -05:00
LICENSE.TXT Rename top-level LICENSE.txt files to LICENSE.TXT 2021-03-10 21:26:24 -08:00
README.txt

LLVM libc
=========

This directory and its subdirectories contain source code for llvm-libc,
a retargetable implementation of the C standard library.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.