Returns whether x is a finite value.
pub fn isFinite(x: anytype) bool
pub fn isFinite(x: anytype) bool {
const T = @TypeOf(x);
const TBits = @Int(.unsigned, @typeInfo(T).float.bits);
const remove_sign = ~@as(TBits, 0) >> 1;
return @as(TBits, @bitCast(x)) & remove_sign < @as(TBits, @bitCast(math.inf(T)));
}