[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:02 PDT 2025
https://github.com/lntue created https://github.com/llvm/llvm-project/pull/150653
None
>From 020e11488b9d46c100e7fa651f3733b86aa2e105 Mon Sep 17 00:00:00 2001
From: Tue Ly <lntue.h at gmail.com>
Date: Fri, 25 Jul 2025 17:04:11 +0000
Subject: [PATCH] [libc] Remove constexpr from math::exp10_range_reduction and
math::exp.
---
libc/src/__support/math/exp.h | 2 +-
libc/src/__support/math/exp10f16_utils.h | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
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