[libc-commits] [libc] [llvm] [libc][math] Implement double-precision acosh (PR #199953)

via libc-commits libc-commits at lists.llvm.org
Fri Jul 3 06:32:35 PDT 2026


================
@@ -882,6 +882,72 @@ LIBC_INLINE_VAR constexpr Float128 BIG_COEFFS[4]{
 }
 #endif // LIBC_MATH_HAS_SKIP_ACCURATE_PASS
 
+// Core range reduction + polynomial evaluation + Ziv rounding test for log.
+// Computes log(x_dd * 2^e_adj) where x_dd.hi is a normal positive finite
+// double. e_adj lets callers compute log(2^k * x) without forming 2^k * x
+// (e.g., to avoid overflow when k = 1 and x >= 2^1023).
+LIBC_INLINE double log_dd_core(fputil::DoubleDouble x_dd, int e_adj) {
----------------
lntue wrote:

pass `DoubleDouble` by const-ref.

https://github.com/llvm/llvm-project/pull/199953


More information about the libc-commits mailing list