[libc-commits] [libc] [llvm] [libc][math] reduce duplicated inv trig helpers (PR #191364)
via libc-commits
libc-commits at lists.llvm.org
Fri Apr 10 17:19:07 PDT 2026
================
@@ -30,82 +30,96 @@ LIBC_INLINE_VAR constexpr DoubleDouble PI = {0x1.1a62633145c07p-53,
LIBC_INLINE_VAR constexpr DoubleDouble PI_OVER_TWO = {0x1.1a62633145c07p-54,
0x1.921fb54442d18p0};
-#ifdef LIBC_MATH_HAS_SKIP_ACCURATE_PASS
+// Scalar double constants for pi and pi/2, used by float-precision
+// implementations (acosf etc.).
+LIBC_INLINE_VAR constexpr double M_MATH_PI = 0x1.921fb54442d18p+1;
+LIBC_INLINE_VAR constexpr double M_MATH_PI_2 = 0x1.921fb54442d18p+0;
----------------
lntue wrote:
Let's just put these definitions inside the functions that use them.
https://github.com/llvm/llvm-project/pull/191364
More information about the libc-commits
mailing list