Floating-point types v0.1.0
float8
extend float8
An eight-bit E4M3 floating-point number with IEEE 754 infinities and NaNs.
Constants
Bits
pub const Bits: uint = 8;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 1;
The number of bytes in the representation.
Lowest
pub const Lowest: float8 = -240.0f8;
The lowest finite value.
Max
pub const Max: float8 = 240.0f8;
The highest finite value.
MinPositive
pub const MinPositive: float8 = 0.015625f8;
The smallest positive normal value.
Epsilon
pub const Epsilon: float8 = 0.125f8;
The difference between one and the next representable value.
Infinity
pub const Infinity: float8;
Positive infinity.
NaN
pub const NaN: float8;
A quiet not-a-number value.
float16
extend float16
An IEEE 754 binary16 floating-point number.
Constants
Bits
pub const Bits: uint = 16;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 2;
The number of bytes in the representation.
Lowest
pub const Lowest: float16 = -65504.0f16;
The lowest finite value.
Max
pub const Max: float16 = 65504.0f16;
The highest finite value.
MinPositive
pub const MinPositive: float16 = 6.103515625e-05f16;
The smallest positive normal value.
Epsilon
pub const Epsilon: float16 = 0.0009765625f16;
The difference between one and the next representable value.
Infinity
pub const Infinity: float16;
Positive infinity.
NaN
pub const NaN: float16;
A quiet not-a-number value.
float32
extend float32
An IEEE 754 binary32 floating-point number.
Constants
Bits
pub const Bits: uint = 32;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 4;
The number of bytes in the representation.
Lowest
pub const Lowest: float32 = -3.4028234663852886e+38f32;
The lowest finite value.
Max
pub const Max: float32 = 3.4028234663852886e+38f32;
The highest finite value.
MinPositive
pub const MinPositive: float32 = 1.1754943508222875e-38f32;
The smallest positive normal value.
Epsilon
pub const Epsilon: float32 = 1.1920928955078125e-7f32;
The difference between one and the next representable value.
Infinity
pub const Infinity: float32;
Positive infinity.
NaN
pub const NaN: float32;
A quiet not-a-number value.
float64
extend float64
An IEEE 754 binary64 floating-point number.
Constants
Bits
pub const Bits: uint = 64;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 8;
The number of bytes in the representation.
Lowest
pub const Lowest: float64 = -1.7976931348623157e+308f64;
The lowest finite value.
Max
pub const Max: float64 = 1.7976931348623157e+308f64;
The highest finite value.
MinPositive
pub const MinPositive: float64 = 2.2250738585072014e-308f64;
The smallest positive normal value.
Epsilon
pub const Epsilon: float64 = 2.2204460492503131e-16f64;
The difference between one and the next representable value.
Infinity
pub const Infinity: float64;
Positive infinity.
NaN
pub const NaN: float64;
A quiet not-a-number value.
float80
extend float80
An x87 extended-precision floating-point number.
Constants
Bits
pub const Bits: uint = 80;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 16;
The number of bytes in the representation.
Lowest
pub const Lowest: float80;
The lowest finite value.
Max
pub const Max: float80;
The highest finite value.
MinPositive
pub const MinPositive: float80;
The smallest positive normal value.
Epsilon
pub const Epsilon: float80;
The difference between one and the next representable value.
Infinity
pub const Infinity: float80;
Positive infinity.
NaN
pub const NaN: float80;
A quiet not-a-number value.
float128
extend float128
An IEEE 754 binary128 floating-point number.
Constants
Bits
pub const Bits: uint = 128;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 16;
The number of bytes in the representation.
Lowest
pub const Lowest: float128;
The lowest finite value.
Max
pub const Max: float128;
The highest finite value.
MinPositive
pub const MinPositive: float128;
The smallest positive normal value.
Epsilon
pub const Epsilon: float128;
The difference between one and the next representable value.
Infinity
pub const Infinity: float128;
Positive infinity.
NaN
pub const NaN: float128;
A quiet not-a-number value.
float256
extend float256
An IEEE 754 binary256 floating-point number.
Constants
Bits
pub const Bits: uint = 256;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 32;
The number of bytes in the representation.
Lowest
pub const Lowest: float256;
The lowest finite value.
Max
pub const Max: float256;
The highest finite value.
MinPositive
pub const MinPositive: float256;
The smallest positive normal value.
Epsilon
pub const Epsilon: float256;
The difference between one and the next representable value.
Infinity
pub const Infinity: float256;
Positive infinity.
NaN
pub const NaN: float256;
A quiet not-a-number value.
float512
extend float512
A binary512 floating-point number in the IEEE 754 interchange-format progression.
Constants
Bits
pub const Bits: uint = 512;
The number of bits in the representation.
Bytes
pub const Bytes: uint = 64;
The number of bytes in the representation.
Lowest
pub const Lowest: float512;
The lowest finite value.
Max
pub const Max: float512;
The highest finite value.
MinPositive
pub const MinPositive: float512;
The smallest positive normal value.
Epsilon
pub const Epsilon: float512;
The difference between one and the next representable value.
Infinity
pub const Infinity: float512;
Positive infinity.
NaN
pub const NaN: float512;
A quiet not-a-number value.