[libc] Implement log10f correctly rounded for all rounding modes.
authorTue Ly <lntue@google.com>
Tue, 25 Jan 2022 02:35:25 +0000 (21:35 -0500)
committerTue Ly <lntue@google.com>
Tue, 25 Jan 2022 15:33:39 +0000 (10:33 -0500)
commite581841e8cf46109acea92e1acb661c404fa62b9
tree2adb1f0898100276b1df42bb2dd0ce210fc11160
parenta2505bd063e7949e2f0d892d85dec360fb28c702
[libc] Implement log10f correctly rounded for all rounding modes.

Based on RLIBM implementation similar to logf and log2f.  Most of the exceptional inputs are the exact powers of 10.

Reviewed By: sivachandra, zimmermann6, santoshn, jpl169

Differential Revision: https://reviews.llvm.org/D118093
15 files changed:
libc/config/linux/aarch64/entrypoints.txt
libc/config/linux/x86_64/entrypoints.txt
libc/spec/stdc.td
libc/src/math/CMakeLists.txt
libc/src/math/generic/CMakeLists.txt
libc/src/math/generic/log10f.cpp [new file with mode: 0644]
libc/src/math/log10f.h [new file with mode: 0644]
libc/test/src/math/CMakeLists.txt
libc/test/src/math/differential_testing/CMakeLists.txt
libc/test/src/math/differential_testing/log10f_perf.cpp [new file with mode: 0644]
libc/test/src/math/exhaustive/CMakeLists.txt
libc/test/src/math/exhaustive/log10f_test.cpp [new file with mode: 0644]
libc/test/src/math/log10f_test.cpp [new file with mode: 0644]
libc/utils/MPFRWrapper/MPFRUtils.cpp
libc/utils/MPFRWrapper/MPFRUtils.h