prefer (uint)-1>>1 to ~((uint)1<<n), remove some unnecessary ()
[libm] / src / math / ilogbl.c
index 099c81a..3b42c4d 100644 (file)
@@ -21,7 +21,7 @@ int ilogbl(long double x)
        }
        if (e == 0x7fff)
                /* in ld80 msb is set in inf */
-               return m & ~((uint64_t)1<<63) ? FP_ILOGBNAN : INT_MAX;
+               return m & (uint64_t)-1>>1 ? FP_ILOGBNAN : INT_MAX;
        return e - 0x3fff;
 }
 #endif