aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
diff options
context:
space:
mode:
authorTue Ly <lntue@google.com>2023-01-08 17:19:13 -0500
committerTue Ly <lntue@google.com>2023-01-08 17:41:54 -0500
commit5814b7b27963229ea78b2092990d72158da748a3 (patch)
treeeab6c6a36fb346a46c442cc23a5ea5bc79559759 /llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
parentacd22b275131a965f4a6006dfa0b237ed6b6572e (diff)
downloadllvm-5814b7b27963229ea78b2092990d72158da748a3.zip
llvm-5814b7b27963229ea78b2092990d72158da748a3.tar.gz
llvm-5814b7b27963229ea78b2092990d72158da748a3.tar.bz2
[libc][math] Implement log10 function correctly rounded for all rounding modes
Implement double precision log10 function correctly rounded for all rounding modes. This implementation currently needs FMA instructions for correctness. Use 2 passes: Fast pass: - 1 step range reduction with a lookup table of `2^7 = 128` elements to reduce the ranges to `[-2^-7, 2^-7]`. - Use a degree-7 minimax polynomial generated by Sollya, evaluated using a mixed of double-double and double precisions. - Apply Ziv's test for accuracy. Accurate pass: - Apply 5 more range reduction steps to reduce the ranges further to [-2^-27, 2^-27]. - Use a degree-4 minimax polynomial generated by Sollya, evaluated using 192-bit precisions. - By the result of Lefevre (add quote), this is more than enough for correct rounding to all rounding modes. In progress: Adding detail documentations about the algorithm. Depend on: https://reviews.llvm.org/D136799 Reviewed By: zimmermann6 Differential Revision: https://reviews.llvm.org/D139846
Diffstat (limited to 'llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions