[all-commits] [llvm/llvm-project] 92bc7f: [libc][math] Update range reduction step for log2f...

lntue via All-commits all-commits at lists.llvm.org
Tue Apr 11 06:43:48 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 92bc7f5428168535cb1ee6c92f739f0b7f72aa5d
      https://github.com/llvm/llvm-project/commit/92bc7f5428168535cb1ee6c92f739f0b7f72aa5d
  Author: Tue Ly <lntue at google.com>
  Date:   2023-04-11 (Tue, 11 Apr 2023)

  Changed paths:
    M libc/src/math/generic/log2f.cpp
    M libc/test/src/math/log2f_test.cpp

  Log Message:
  -----------
  [libc][math] Update range reduction step for log2f and improve its performance.

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.

Reviewed By: zimmermann6

Differential Revision: https://reviews.llvm.org/D147759




More information about the All-commits mailing list