Trait rustc_apfloat::ieee::Semantics [−][src]
pub trait Semantics: Sized { const BITS: usize; const PRECISION: usize; const MAX_EXP: ExpInt; const MIN_EXP: ExpInt; const QNAN_BIT: usize; const QNAN_SIGNIFICAND: u128; fn from_bits(bits: u128) -> IeeeFloat<Self> { ... } fn to_bits(x: IeeeFloat<Self>) -> u128 { ... } }
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Represents floating point arithmetic semantics.
Associated Constants
const BITS: usize
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Total number of bits in the in-memory format.
const PRECISION: usize
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Number of bits in the significand. This includes the integer bit.
const MAX_EXP: ExpInt
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
The largest E such that 2E is representable; this matches the definition of IEEE 754.
const MIN_EXP: ExpInt
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
MIN_EXP: ExpInt = -<Self>::MAX_EXP + 1
The smallest E such that 2E is a normalized number; this matches the definition of IEEE 754.
const QNAN_BIT: usize
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
QNAN_BIT: usize = <Self>::PRECISION - 2
The significand bit that marks NaN as quiet.
const QNAN_SIGNIFICAND: u128
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
QNAN_SIGNIFICAND: u128 = 1 << <Self>::QNAN_BIT
The significand bitpattern to mark a NaN as quiet. NOTE: for X87DoubleExtended we need to set two bits instead of 2.
Provided Methods
fn from_bits(bits: u128) -> IeeeFloat<Self>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn to_bits(x: IeeeFloat<Self>) -> u128
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Implementors
impl Semantics for HalfSimpl Semantics for SingleSimpl Semantics for DoubleSimpl Semantics for QuadSimpl Semantics for X87DoubleExtendedSimpl<F: Float> Semantics for FallbackS<F>impl<F: Float> Semantics for FallbackExtendedS<F>