aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Bassiouni <60100307+bassiounix@users.noreply.github.com>2025-08-03 21:27:54 +0300
committerGitHub <noreply@github.com>2025-08-03 21:27:54 +0300
commitd7f00a9f9554825d35bd864be1e44e74a133d5b6 (patch)
treea5a22182a0363cee09a7697bf078574d4d29c916
parent003f6ada15970608c183563949e73320b0fea36a (diff)
downloadllvm-d7f00a9f9554825d35bd864be1e44e74a133d5b6.zip
llvm-d7f00a9f9554825d35bd864be1e44e74a133d5b6.tar.gz
llvm-d7f00a9f9554825d35bd864be1e44e74a133d5b6.tar.bz2
[libc] fix build errors caused by cbrt. (#151879)
-rw-r--r--libc/src/__support/math/cbrt.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/src/__support/math/cbrt.h b/libc/src/__support/math/cbrt.h
index 2b9a73c..9d86bf3 100644
--- a/libc/src/__support/math/cbrt.h
+++ b/libc/src/__support/math/cbrt.h
@@ -146,7 +146,6 @@ LIBC_INLINE static constexpr double get_error(const DoubleDouble &x_3,
LIBC_INLINE static constexpr double cbrt(double x) {
using DoubleDouble = fputil::DoubleDouble;
- using Float128 = fputil::DyadicFloat<128>;
using namespace cbrt_internal;
using FPBits = fputil::FPBits<double>;
@@ -295,6 +294,8 @@ LIBC_INLINE static constexpr double cbrt(double x) {
if (LIBC_LIKELY(r2_upper == r2_lower))
return update_exponent(r2_upper);
+ using Float128 = fputil::DyadicFloat<128>;
+
// TODO: Investigate removing float128 and just list exceptional cases.
// Apply another Newton iteration with ~126-bit accuracy.
Float128 x2_f128 = fputil::quick_add(Float128(x2.hi), Float128(x2.lo));