floatMax
Returns the largest normal number representable in floating point type T.
Function parameters
Parameters
- T:type
Functions in this namespace
Functions
- floatExponentBits
- Returns the number of bits in the exponent of floating point type T.
- floatMantissaBits
- Returns the number of bits in the mantissa of floating point type T.
- floatFractionalBits
- Returns the number of fractional bits in the mantissa of floating point type T.
- floatExponentMin
- Returns the minimum exponent that can represent
- floatExponentMax
- Returns the maximum exponent that can represent
- floatTrueMin
- Returns the smallest subnormal number representable in floating point type T.
- floatMin
- Returns the smallest normal number representable in floating point type T.
- floatMax
- Returns the largest normal number representable in floating point type T.
- floatEps
- Returns the machine epsilon of floating point type T.
- floatEpsAt
- Returns the local epsilon of floating point type T.
- inf
- Returns the inf value for a floating point `Type`.
- nan
- Returns the canonical quiet NaN representation for a floating point `Type`.
- snan
- Returns a signalling NaN representation for a floating point `Type`.
Source
Implementation
pub inline fn floatMax(comptime T: type) T {
const all1s_mantissa = (1 << floatMantissaBits(T)) - 1;
return reconstructFloat(T, floatExponentMax(T), all1s_mantissa);
}