[all-commits] [llvm/llvm-project] dbac42: [libc][math] Fix fast path with small inputs for d...

lntue via All-commits all-commits at lists.llvm.org
Sun Sep 13 19:50:01 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dbac421efa19a5901f2511958040e18e8188b112
      https://github.com/llvm/llvm-project/commit/dbac421efa19a5901f2511958040e18e8188b112
  Author: lntue <lntue at google.com>
  Date:   2026-09-13 (Sun, 13 Sep 2026)

  Changed paths:
    M libc/CMakeLists.txt
    M libc/cmake/modules/LLVMLibCTestRules.cmake
    M libc/src/__support/math/cos.h
    M libc/src/__support/math/sin.h
    M libc/test/src/math/exhaustive/CMakeLists.txt
    A libc/test/src/math/exhaustive/cos.bin
    A libc/test/src/math/exhaustive/cos.wc
    A libc/test/src/math/exhaustive/cos_test.cpp
    M libc/test/src/math/exhaustive/exhaustive_test.h
    M libc/test/src/math/exhaustive/exhaustive_test_static_rounding.h
    A libc/test/src/math/exhaustive/sin.bin
    A libc/test/src/math/exhaustive/sin.wc
    A libc/test/src/math/exhaustive/sin_test.cpp
    A libc/test/src/math/exhaustive/worst_case_test.h
    M libc/test/src/mathvec/exhaustive/exhaustive_test.h
    A libc/utils/mathtools/wc_to_bin.py

  Log Message:
  -----------
  [libc][math] Fix fast path with small inputs for double precision sin/cos. (#221012)

https://github.com/llvm/llvm-project/pull/201748 added a fast branch for
small inputs to double precision sin/cos,
but the Ziv error bounds were too tight.

Fixes in this PR:
- Updating the Ziv error bounds to accommodate rounding errors.
- Copy binary64 sin/cos hard-to-round cases from the CORE-MATH project.
- Add python tool to convert textual hard to round cases to binary
files, and add those binary files.
- Add hard-to-round tests for double precision sin/cos in the exhaustive
test folder.

Fixes https://github.com/llvm/llvm-project/issues/220934.

Assisted-by: Gemini is used to generate the worst-case text-to-binary
tool.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list