pub trait Semantics: Sized {
const BITS: usize;
const EXP_BITS: usize;
const PRECISION: usize = _;
const NONFINITE_BEHAVIOR: NonfiniteBehavior = NonfiniteBehavior::IEEE754;
const MAX_EXP: ExpInt = _;
const IEEE_MAX_EXP: ExpInt = _;
const MIN_EXP: ExpInt = Self::IEEE_MIN_EXP;
const IEEE_MIN_EXP: ExpInt = _;
const NAN_SIGNIFICAND_BASE: u128 = _;
const NAN_PAYLOAD_MASK: u128 = _;
const QNAN_SIGNIFICAND: u128 = _;
// Provided methods
fn from_bits(bits: u128) -> IeeeFloat<Self> { ... }
fn to_bits(x: IeeeFloat<Self>) -> u128 { ... }
}
Expand description
Represents floating point arithmetic semantics.
Required Associated Constants§
Provided Associated Constants§
Sourceconst NONFINITE_BEHAVIOR: NonfiniteBehavior = NonfiniteBehavior::IEEE754
const NONFINITE_BEHAVIOR: NonfiniteBehavior = NonfiniteBehavior::IEEE754
How the nonfinite values Inf and NaN are represented.
Sourceconst MAX_EXP: ExpInt = _
const MAX_EXP: ExpInt = _
The largest E such that 2^E is representable; this matches the definition of IEEE 754.
const IEEE_MAX_EXP: ExpInt = _
Sourceconst MIN_EXP: ExpInt = Self::IEEE_MIN_EXP
const MIN_EXP: ExpInt = Self::IEEE_MIN_EXP
The smallest E such that 2^E is a normalized number; this matches the definition of IEEE 754.
const IEEE_MIN_EXP: ExpInt = _
Sourceconst NAN_SIGNIFICAND_BASE: u128 = _
const NAN_SIGNIFICAND_BASE: u128 = _
The base significand bitpattern of NaNs, i.e. the bits that must always
be set in all NaNs, with other significand bits being either used for
payload bits (if NAN_PAYLOAD_MASK
covers them) or always unset.
Sourceconst NAN_PAYLOAD_MASK: u128 = _
const NAN_PAYLOAD_MASK: u128 = _
The significand bitmask for the payload of a NaN (if supported), including the “quiet bit” (telling QNaNs apart from SNaNs).
Sourceconst QNAN_SIGNIFICAND: u128 = _
const QNAN_SIGNIFICAND: u128 = _
The significand bitpattern to mark a NaN as quiet (if supported).
NOTE: for X87DoubleExtended we need to set two bits instead of one.
NOTE: all NaNs are quiet if unsupported (see NonfiniteBehavior::NanOnly
).
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.