Skip to content

Commit ac1d5fa

Browse files
authored
[libc][math] Remove constexpr quantifier from cbrt's utility functions. (#99349)
Fix full build failures: https://lab.llvm.org/buildbot/#/builders/131/builds/2342
1 parent 7fc9fb9 commit ac1d5fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libc/src/math/generic/cbrt.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace {
3535
// > P = fpminimax(x^(-2/3), 7, [|D...|], [1, 2]);
3636
// > dirtyinfnorm(P/x^(-2/3) - 1, [1, 2]);
3737
// 0x1.28...p-21
38-
constexpr double intial_approximation(double x) {
38+
double intial_approximation(double x) {
3939
constexpr double COEFFS[8] = {
4040
0x1.bc52aedead5c6p1, -0x1.b52bfebf110b3p2, 0x1.1d8d71d53d126p3,
4141
-0x1.de2db9e81cf87p2, 0x1.0154ca06153bdp2, -0x1.5973c66ee6da7p0,
@@ -59,12 +59,12 @@ constexpr double intial_approximation(double x) {
5959
// Get the error term for Newton iteration:
6060
// h(x) = x^3 * a^2 - 1,
6161
#ifdef LIBC_TARGET_CPU_HAS_FMA
62-
constexpr double get_error(const DoubleDouble &x_3, const DoubleDouble &a_sq) {
62+
double get_error(const DoubleDouble &x_3, const DoubleDouble &a_sq) {
6363
return fputil::multiply_add(x_3.hi, a_sq.hi, -1.0) +
6464
fputil::multiply_add(x_3.lo, a_sq.hi, x_3.hi * a_sq.lo);
6565
}
6666
#else
67-
constexpr double get_error(const DoubleDouble &x_3, const DoubleDouble &a_sq) {
67+
double get_error(const DoubleDouble &x_3, const DoubleDouble &a_sq) {
6868
DoubleDouble x_3_a_sq = fputil::quick_mult(a_sq, x_3);
6969
return (x_3_a_sq.hi - 1.0) + x_3_a_sq.lo;
7070
}

0 commit comments

Comments
 (0)