[libc-commits] [libc] d7f00a9 - [libc] fix build errors caused by cbrt. (#151879)

via libc-commits libc-commits at lists.llvm.org
Sun Aug 3 11:27:57 PDT 2025


Author: Muhammad Bassiouni
Date: 2025-08-03T21:27:54+03:00
New Revision: d7f00a9f9554825d35bd864be1e44e74a133d5b6

URL: https://github.com/llvm/llvm-project/commit/d7f00a9f9554825d35bd864be1e44e74a133d5b6
DIFF: https://github.com/llvm/llvm-project/commit/d7f00a9f9554825d35bd864be1e44e74a133d5b6.diff

LOG: [libc] fix build errors caused by cbrt. (#151879)

Added: 
    

Modified: 
    libc/src/__support/math/cbrt.h

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/math/cbrt.h b/libc/src/__support/math/cbrt.h
index 2b9a73c823b14..9d86bf3dab8b3 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));


        


More information about the libc-commits mailing list