[all-commits] [llvm/llvm-project] 0f1f23: [libc][math] Adding constexpr to tests for Double-...

Zorojuro via All-commits all-commits at lists.llvm.org
Mon Jun 1 11:30:43 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f1f234990f40c942fb8b87cd2141c48848b8253
      https://github.com/llvm/llvm-project/commit/0f1f234990f40c942fb8b87cd2141c48848b8253
  Author: Zorojuro <sawantsukumar at gmail.com>
  Date:   2026-06-01 (Mon, 01 Jun 2026)

  Changed paths:
    M libc/test/src/math/acos_test.cpp
    M libc/test/src/math/asin_test.cpp
    M libc/test/src/math/atan_test.cpp
    M libc/test/src/math/cbrt_test.cpp
    M libc/test/src/math/exp10_test.cpp
    M libc/test/src/math/exp2_test.cpp
    M libc/test/src/math/exp_test.cpp
    M libc/test/src/math/expm1_test.cpp
    M libc/test/src/math/sin_test.cpp
    M libc/test/src/math/sincos_test.cpp

  Log Message:
  -----------
  [libc][math] Adding constexpr to tests for Double-type math functions  (#200681)

Similar to 
```CPP
  constexpr uint64_t X_COUNT = 123;
  constexpr uint64_t X_START = FPBits(0.25).uintval();
  constexpr uint64_t X_STOP = FPBits(4.0).uintval();
  constexpr uint64_t X_STEP = (X_STOP - X_START) / X_COUNT;

  constexpr uint64_t Y_COUNT = 137;
  constexpr uint64_t Y_START = FPBits(0.25).uintval();
  constexpr uint64_t Y_STOP = FPBits(4.0).uintval();
  constexpr uint64_t Y_STEP = (Y_STOP - Y_START) / Y_COUNT;
  ```
  in [atan2_test.cpp](https://github.com/llvm/llvm-project/blob/main/libc/test/src/math/atan2_test.cpp)
  This PR tends to add constexpr to all double function tests-only
  
  Additonally, replacing 
  ``` CPP
  LIBC_NAMESPACE::fputil::FPBits<double>(x).uintval();
   ```
to 
```CPP
FPBits(x).uintval();
```
  Assisted using Copilot.



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