pub fn isSignalNan(x: anytype) bool
TODO: LLVM is known to miscompile on some architectures to quiet NaN - this is tracked by https://github.com/ziglang/zig/issues/14366
x
12 13 14 15 16 17
pub fn isSignalNan(x: anytype) bool { const T = @TypeOf(x); const U = @Int(.unsigned, @bitSizeOf(T)); const quiet_signal_bit_mask = 1 << (math.floatFractionalBits(T) - 1); return isNan(x) and (@as(U, @bitCast(x)) & quiet_signal_bit_mask == 0); }
TODO: LLVM is known to miscompile on some architectures to quiet NaN - this is tracked by https://github.com/ziglang/zig/issues/14366