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 = _;

    // 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§

source

const BITS: usize

Total number of bits in the in-memory format.

source

const PRECISION: usize

Number of bits in the significand. This includes the integer bit.

source

const MAX_EXP: ExpInt

The largest E such that 2E is representable; this matches the definition of IEEE 754.

Provided Associated Constants§

source

const MIN_EXP: ExpInt = _

The smallest E such that 2E is a normalized number; this matches the definition of IEEE 754.

source

const QNAN_BIT: usize = _

The significand bit that marks NaN as quiet.

source

const QNAN_SIGNIFICAND: u128 = _

The significand bitpattern to mark a NaN as quiet. NOTE: for X87DoubleExtended we need to set two bits instead of 2.

Provided Methods§

source

fn from_bits(bits: u128) -> IeeeFloat<Self>

source

fn to_bits(x: IeeeFloat<Self>) -> u128

Implementors§

source§

impl Semantics for DoubleS

source§

const BITS: usize = 64usize

source§

const PRECISION: usize = 53usize

source§

const MAX_EXP: ExpInt = 1_023i16

source§

impl Semantics for HalfS

source§

const BITS: usize = 16usize

source§

const PRECISION: usize = 11usize

source§

const MAX_EXP: ExpInt = 15i16

source§

impl Semantics for QuadS

source§

const BITS: usize = 128usize

source§

const PRECISION: usize = 113usize

source§

const MAX_EXP: ExpInt = 16_383i16

source§

impl Semantics for SingleS

source§

const BITS: usize = 32usize

source§

const PRECISION: usize = 24usize

source§

const MAX_EXP: ExpInt = 127i16

source§

impl Semantics for X87DoubleExtendedS

source§

const BITS: usize = 80usize

source§

const PRECISION: usize = 64usize

source§

const MAX_EXP: ExpInt = 16_383i16

source§

const QNAN_SIGNIFICAND: u128 = 13_835_058_055_282_163_712u128

source§

impl<F: Float> Semantics for FallbackExtendedS<F>

source§

const BITS: usize = 0usize

source§

const PRECISION: usize = Fallback<F>::PRECISION

source§

const MAX_EXP: ExpInt = _

source§

impl<F: Float> Semantics for FallbackS<F>