[all-commits] [llvm/llvm-project] bc8e87: [libc][math] Update range reduction step for logf ...

lntue via All-commits all-commits at lists.llvm.org
Mon Apr 10 10:00:53 PDT 2023


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

  Changed paths:
    M libc/src/math/generic/common_constants.cpp
    M libc/src/math/generic/common_constants.h
    M libc/src/math/generic/logf.cpp
    M libc/test/src/math/logf_test.cpp

  Log Message:
  -----------
  [libc][math] Update range reduction step for logf and reduce its latency.

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. This allows the
polynomial evaluations to be parallelized more efficiently.

Reviewed By: santoshn, zimmermann6

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




More information about the All-commits mailing list