Float
64-bit floating point numbers.
Rounding preserves signed zero and rounds halfway cases away from zero.
signum returns NaN for NaN and distinguishes positive and negative zero.
Inherits from: Num
Constructor
Float()
Converts a number to a float.
Float accepts a float or an integer that can be represented exactly.
The lowercase float function performs numeric coercion and parsing:
Fields
EPSILON @ Float[get, set]Difference between
1.0and the next greater representable value.INF @ Float[get, set]Positive infinity.
NAN @ Float[get, set]A not-a-number value.
Methods
is_finite() -> Bool
Tests whether the value is finite.
is_infinite() -> Bool
Tests whether the value is positive or negative infinity.
is_nan() -> Bool
Tests whether the value is NaN.
is_normal() -> Bool
Tests whether the value is normal.
is_subnormal() -> Bool
Tests whether the value is subnormal.