pub trait Float: Copy + PartialEq + PartialOrd + AsBits where
Self::Bits: Cast<Self::BiasedExponent>,
Self::BiasedExponent: Cast<Self::Exponent>,
Self::Bits: Cast<Self::Significand>,
Self::Exponent: Sub<Output = Self::Exponent>,
Self::Significand: Add<Output = Self::Significand>, {
type BiasedExponent;
type Exponent;
type Significand;
const BITS: u16;
const EXP_BITS: u16;
const SIGNIF_BITS: u16;
const SIGN_MASK: Self::Bits;
const EXP_MASK: Self::Bits;
const SIGNIF_MASK: Self::Bits;
const EXP_BIAS: Self::Exponent;
fn sign_bit(self) -> bool { ... }
fn biased_exponent(self) -> Self::BiasedExponent { ... }
fn exponent(self) -> Self::Exponent { ... }
fn stored_significand(self) -> Self::Significand { ... }
fn significand(self) -> Self::Significand { ... }
fn fraction(self) -> Self::Significand { ... }
fn raw_components(self) -> (bool, Self::BiasedExponent, Self::Significand) { ... }
fn components(self) -> (bool, Self::Exponent, Self::Significand) { ... }
fn explain(self)
where
Self: Debug,
Self::BiasedExponent: Debug,
Self::Exponent: Debug,
Self::Significand: Debug,
{ ... }
}Expand description
Types that represent a floating point number.
Associated Types
type BiasedExponent
type BiasedExponent
Type for the the biased exponent.
type Significand
type Significand
Type for the significand, both with and without implicit bit.
Associated Constants
The number of bits (defaults to <Self as AsBits>::Bits::BITS).
const SIGNIF_BITS: u16
const SIGNIF_BITS: u16
The number of bits of the stored significand (not counting the implicit bit).
const SIGNIF_MASK: Self::Bits
const SIGNIF_MASK: Self::Bits
The mask for the stored significand bits (no implicit bit).