[libc-commits] [libc] [libc] Remove constexpr from asin_eval() (PR #151528)
William Huynh via libc-commits
libc-commits at lists.llvm.org
Thu Jul 31 07:32:59 PDT 2025
https://github.com/saturn691 created https://github.com/llvm/llvm-project/pull/151528
fputil::multiply_add is conditionally constexpr, on some architectures, it selects the non-constexpr version, resulting in a compile error.
>From e0a1fac48f18913b6efe22e7db9c8822c6d9e224 Mon Sep 17 00:00:00 2001
From: William Huynh <William.Huynh at arm.com>
Date: Thu, 31 Jul 2025 15:31:07 +0100
Subject: [PATCH] [libc] Remove constexpr from asin_eval()
fputil::multiply_add is conditionally constexpr, on some
architectures, it selects the non-constexpr version, resulting
in a compile error.
---
libc/src/__support/math/asin_utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/src/__support/math/asin_utils.h b/libc/src/__support/math/asin_utils.h
index e0c9096e2bb78..efe779c8a81fd 100644
--- a/libc/src/__support/math/asin_utils.h
+++ b/libc/src/__support/math/asin_utils.h
@@ -45,7 +45,7 @@ static constexpr double ASIN_COEFFS[12] = {
0x1.2b5993bda1d9bp-6, -0x1.806aff270bf25p-7, 0x1.02614e5ed3936p-5,
};
-LIBC_INLINE static constexpr double asin_eval(double u) {
+LIBC_INLINE double asin_eval(double u) {
double u2 = u * u;
double c0 = fputil::multiply_add(u, ASIN_COEFFS[1], ASIN_COEFFS[0]);
double c1 = fputil::multiply_add(u, ASIN_COEFFS[3], ASIN_COEFFS[2]);
More information about the libc-commits
mailing list