[libc-commits] [libc] [libc] Remove specific nan payload in math functions (PR #79165)

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Tue Jan 23 08:39:45 PST 2024


================
@@ -109,7 +109,7 @@ LLVM_LIBC_FUNCTION(float, asinf, (float x)) {
       fputil::set_errno_if_required(EDOM);
       fputil::raise_except_if_required(FE_INVALID);
     }
-    return x + FPBits::build_nan(Sign::POS, FPBits::FRACTION_MASK).get_val();
+    return x + FPBits::build_nan().get_val();
----------------
gchatelet wrote:

@lntue independent from this patch, I don't really understand why we need to add `x` and `NaN`. Is there a reason?

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


More information about the libc-commits mailing list