[libc-commits] [libc] [libc][math] Fix log1p SEGV with large inputs when FTZ/DAZ flags are set. (PR #115541)

via libc-commits libc-commits at lists.llvm.org
Fri Nov 8 12:50:02 PST 2024


================
@@ -975,16 +975,18 @@ LLVM_LIBC_FUNCTION(double, log1p, (double x)) {
   double err_hi = ERR_HI[hi == 0.0];
 
   // Scaling factior = 2^(-xh_bits.get_exponent())
----------------
lntue wrote:

yes, it's still the same scaling factor, but we do subtracting exponents (ldexp style) instead of multiply by `2^(-exp)`.  I updated the comment to make it a bit clearer.

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


More information about the libc-commits mailing list