Skip to content

Commit c22217a

Browse files
committed
fix gcc problems
1 parent a39b11b commit c22217a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

libc/src/__support/FPUtil/PolyEval.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ LIBC_INLINE cpp::enable_if_t<(sizeof(T) <= sizeof(void *)), T> polyeval(T,
3737
}
3838

3939
template <typename T, typename... Ts>
40-
LIBC_INLINE cpp::enable_if_t<(sizeof(T) > sizeof(void *)), T>
40+
LIBC_INLINE static constexpr cpp::enable_if_t<(sizeof(T) > sizeof(void *)), T>
4141
polyeval(const T &x, const T &a0, const Ts &...a) {
4242
return multiply_add(x, polyeval(x, a...), a0);
4343
}

libc/src/__support/math/exp10.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ namespace {
6868
// > P;
6969
// Error bounds:
7070
// | output - (10^dx - 1) / dx | < 2^-52.
71-
LIBC_INLINE static constexpr double poly_approx_d(double dx) {
71+
LIBC_INLINE static double poly_approx_d(double dx) {
7272
// dx^2
7373
double dx2 = dx * dx;
7474
double c0 =
@@ -128,7 +128,7 @@ static constexpr Float128 poly_approx_f128(const Float128 &dx) {
128128
// Compute 10^(x) using 128-bit precision.
129129
// TODO(lntue): investigate triple-double precision implementation for this
130130
// step.
131-
static constexpr Float128 exp10_f128(double x, double kd, int idx1, int idx2) {
131+
static Float128 exp10_f128(double x, double kd, int idx1, int idx2) {
132132
double t1 = fputil::multiply_add(kd, MLOG10_2_EXP2_M12_HI, x); // exact
133133
double t2 = kd * MLOG10_2_EXP2_M12_MID_32; // exact
134134
double t3 = kd * MLOG10_2_EXP2_M12_LO; // Error < 2^-144
@@ -159,7 +159,7 @@ static constexpr Float128 exp10_f128(double x, double kd, int idx1, int idx2) {
159159
}
160160

161161
// Compute 10^x with double-double precision.
162-
static constexpr DoubleDouble exp10_double_double(double x, double kd,
162+
static DoubleDouble exp10_double_double(double x, double kd,
163163
const DoubleDouble &exp_mid) {
164164
// Recalculate dx:
165165
// dx = x - k * 2^-12 * log10(2)
@@ -182,7 +182,7 @@ static constexpr DoubleDouble exp10_double_double(double x, double kd,
182182
#endif // LIBC_MATH_HAS_SKIP_ACCURATE_PASS
183183

184184
// When output is denormal.
185-
static constexpr double exp10_denorm(double x) {
185+
static double exp10_denorm(double x) {
186186
// Range reduction.
187187
double tmp = fputil::multiply_add(x, LOG2_10, 0x1.8000'0000'4p21);
188188
int k = static_cast<int>(cpp::bit_cast<uint64_t>(tmp) >> 19);

0 commit comments

Comments
 (0)