From: Tue Ly Date: Tue, 8 Feb 2022 02:04:12 +0000 (-0500) Subject: [libc] Return a float NaN for log1pf instead of double NaN. X-Git-Tag: upstream/15.0.7~17457 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e5e93f60ee0249d7aa8fe1723f8531e795adc479;p=platform%2Fupstream%2Fllvm.git [libc] Return a float NaN for log1pf instead of double NaN. --- diff --git a/libc/src/math/generic/log1pf.cpp b/libc/src/math/generic/log1pf.cpp index 25e5271..b9494a4 100644 --- a/libc/src/math/generic/log1pf.cpp +++ b/libc/src/math/generic/log1pf.cpp @@ -44,7 +44,8 @@ INLINE_FMA static inline float log(double x) { if (xbits.uintval() > FPBits::MAX_NORMAL) { if (xbits.get_sign() && !xbits.is_nan()) { - return FPBits::build_nan(1 << (fputil::MantissaWidth::VALUE - 1)); + return fputil::FPBits::build_nan( + 1 << (fputil::MantissaWidth::VALUE - 1)); } return static_cast(x); }