TODO: LLVM is known to miscompile on some architectures to quiet NaN - this is tracked by https://github.com/ziglang/zig/issues/14366
pub fn isSignalNan(x: anytype) bool
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);
}