unbias
Function parameters
Parameters
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 fn unbias(biased: BiasedExponent) Exponent {
switch (biased) {
.denormal => unreachable,
else => return @bitCast(@intFromEnum(biased) -% @intFromEnum(BiasedExponent.zero)),
.infinite => unreachable,
}
}