Returns two booleans for a float or float64: whether it is NaN, and whether it is an infinity of either sign.
nan, inf := is_nan_is_inf(FLOAT32_INFINITY);
assert(!nan && inf);
nan, inf = is_nan_is_inf(FLOAT32_NAN);
assert(nan && !inf);is_nan_is_inf :: (x: float64) -> (isnan: bool, isinf: bool)
Whether x is NaN, and whether it is infinite (either sign).
Parameters
- x: float64
- the value to test.
Returns
- isnan: bool
- isinf: bool
is_nan_is_inf :: (x: float32) -> (isnan: bool, isinf: bool)
Whether x is NaN, and whether it is infinite (either sign).
Parameters
- x: float32
- the value to test.
Returns
- isnan: bool
- isinf: bool