[libc-commits] [libc] [libc] Remove constexpr from math::exp10_range_reduction and math::exp. (PR #150653)

via libc-commits libc-commits at lists.llvm.org
Fri Jul 25 10:06:36 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: None (lntue)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/150653.diff


2 Files Affected:

- (modified) libc/src/__support/math/exp.h (+1-1) 
- (modified) libc/src/__support/math/exp10f16_utils.h (+1-2) 


``````````diff
diff --git a/libc/src/__support/math/exp.h b/libc/src/__support/math/exp.h
index 1b704117f3814..14f05920edacf 100644
--- a/libc/src/__support/math/exp.h
+++ b/libc/src/__support/math/exp.h
@@ -234,7 +234,7 @@ static double set_exceptional(double x) {
 
 namespace math {
 
-static constexpr double exp(double x) {
+LIBC_INLINE static double exp(double x) {
   using FPBits = typename fputil::FPBits<double>;
   FPBits xbits(x);
 
diff --git a/libc/src/__support/math/exp10f16_utils.h b/libc/src/__support/math/exp10f16_utils.h
index bffb81ba606bb..5952a4160511d 100644
--- a/libc/src/__support/math/exp10f16_utils.h
+++ b/libc/src/__support/math/exp10f16_utils.h
@@ -19,8 +19,7 @@
 
 namespace LIBC_NAMESPACE_DECL {
 
-LIBC_INLINE static constexpr ExpRangeReduction
-exp10_range_reduction(float16 x) {
+LIBC_INLINE static ExpRangeReduction exp10_range_reduction(float16 x) {
   // For -8 < x < 5, to compute 10^x, we perform the following range reduction:
   // find hi, mid, lo, such that:
   //   x = (hi + mid) * log2(10) + lo, in which

``````````

</details>


https://github.com/llvm/llvm-project/pull/150653


More information about the libc-commits mailing list