[libc-commits] [libc] [libc][math][c23] Add fmodl and fmodf128 math functions. (PR #84600)

via libc-commits libc-commits at lists.llvm.org
Mon Mar 11 12:58:13 PDT 2024


================
@@ -174,13 +174,11 @@ class FMod {
     const T quiet_nan = FPB::quiet_nan().get_val();
     FPB sx(x), sy(y);
     if (LIBC_LIKELY(!sy.is_zero() && !sy.is_inf_or_nan() &&
-                    !sx.is_inf_or_nan())) {
+                    !sx.is_inf_or_nan()))
       return false;
-    }
 
     if (sx.is_nan() || sy.is_nan()) {
-      if ((sx.is_nan() && !sx.is_quiet_nan()) ||
-          (sy.is_nan() && !sy.is_quiet_nan()))
+      if (sx.is_signalling_nan() || sy.is_signalling())
----------------
lntue wrote:

Actually neither of them are correct.  The correct function is `is_signaling_nan()`.

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


More information about the libc-commits mailing list