[libc-commits] [PATCH] D147759: [libc][math] Update range reduction step for log2f and improve its performance.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Apr 6 19:40:41 PDT 2023


lntue created this revision.
lntue added reviewers: michaelrj, sivachandra, renyichen, santoshn, zimmermann6.
Herald added subscribers: ecnelises, tschuett.
Herald added projects: libc-project, All.
lntue requested review of this revision.

Simplify the range reduction steps by choosing the reduction constants
carefully so that the reduced arguments v = r*m_x - 1 and v^2 are exact in double
precision, even without FMA instructions, and -2^-8 <= v < 2^-7.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D147759

Files:
  libc/src/math/generic/log2f.cpp
  libc/test/src/math/log2f_test.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147759.511594.patch
Type: text/x-patch
Size: 9902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230407/1ecdb273/attachment.bin>


More information about the libc-commits mailing list