[libc-commits] [libc] b465276 - [libc] Remove constexpr from math::exp10_range_reduction and math::exp. (#150653)
via libc-commits
libc-commits at lists.llvm.org
Fri Jul 25 10:31:42 PDT 2025
Author: lntue
Date: 2025-07-25T13:31:38-04:00
New Revision: b46527645db279daf50f540a3496bbd81a95200a
URL: https://github.com/llvm/llvm-project/commit/b46527645db279daf50f540a3496bbd81a95200a
DIFF: https://github.com/llvm/llvm-project/commit/b46527645db279daf50f540a3496bbd81a95200a.diff
LOG: [libc] Remove constexpr from math::exp10_range_reduction and math::exp. (#150653)
Added:
Modified:
libc/src/__support/math/exp.h
libc/src/__support/math/exp10f16_utils.h
Removed:
################################################################################
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
More information about the libc-commits
mailing list