[libc] Return a float NaN for log1pf instead of double NaN.
authorTue Ly <lntue@google.com>
Tue, 8 Feb 2022 02:04:12 +0000 (21:04 -0500)
committerTue Ly <lntue@google.com>
Tue, 8 Feb 2022 02:07:09 +0000 (21:07 -0500)
libc/src/math/generic/log1pf.cpp

index 25e5271..b9494a4 100644 (file)
@@ -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<float>::VALUE - 1));
+      return fputil::FPBits<float>::build_nan(
+          1 << (fputil::MantissaWidth<float>::VALUE - 1));
     }
     return static_cast<float>(x);
   }