[libc-commits] [libc] 38fa11f - [libc] Remove constexpr from asin_eval() (#151528)

via libc-commits libc-commits at lists.llvm.org
Thu Jul 31 10:20:40 PDT 2025


Author: William Huynh
Date: 2025-07-31T13:20:37-04:00
New Revision: 38fa11f5b4cad7aec3697b913f8c54f987049060

URL: https://github.com/llvm/llvm-project/commit/38fa11f5b4cad7aec3697b913f8c54f987049060
DIFF: https://github.com/llvm/llvm-project/commit/38fa11f5b4cad7aec3697b913f8c54f987049060.diff

LOG: [libc] Remove constexpr from asin_eval() (#151528)

fputil::multiply_add is conditionally constexpr, on some architectures,
it selects the non-constexpr version, resulting in a compile error.

Added: 
    

Modified: 
    libc/src/__support/math/asin_utils.h

Removed: 
    


################################################################################
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