BaseEncoding

Trait BaseEncoding 

Source
pub trait BaseEncoding: Copy {
    const MAX_FINITE: Self;
    const MIN_FINITE: Self;
    const MIN_POSITIVE_NORMAL: Self;
    const EPSILON: Self;

    // Required methods
    fn classify(self) -> FpCategory;
    fn is_normal(self) -> bool;
    fn is_sign_positive(self) -> bool;
    fn is_sign_negative(self) -> bool;
    fn signum(self) -> Self;
    fn integer_decode(self) -> (u64, i16, i8);
}
Expand description

A type with an IEEE 754 floating-point representation that exposes its basic encoding.

BaseEncoding types have a floating-point representation (binaryN), but may not support nor expose other elements of the specification. This trait describes the most basic non-computational elements of the encoding and does not specify the inhabitants of a type.

Required Associated Constants§

Source

const MAX_FINITE: Self

Source

const MIN_FINITE: Self

Source

const MIN_POSITIVE_NORMAL: Self

Source

const EPSILON: Self

Required 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.

Implementations on Foreign Types§

Source§

impl BaseEncoding for f32

Source§

const MAX_FINITE: Self = 3.40282347E+38f32

Source§

const MIN_FINITE: Self = -3.40282347E+38f32

Source§

const MIN_POSITIVE_NORMAL: Self = 1.17549435E-38f32

Source§

const EPSILON: Self = 1.1920929E-7f32

Source§

fn classify(self) -> FpCategory

Source§

fn is_normal(self) -> bool

Source§

fn is_sign_positive(self) -> bool

Source§

fn is_sign_negative(self) -> bool

Source§

fn signum(self) -> Self

Source§

fn integer_decode(self) -> (u64, i16, i8)

Source§

impl BaseEncoding for f64

Source§

const MAX_FINITE: Self = 1.7976931348623157E+308f64

Source§

const MIN_FINITE: Self = -1.7976931348623157E+308f64

Source§

const MIN_POSITIVE_NORMAL: Self = 2.2250738585072014E-308f64

Source§

const EPSILON: Self = 2.2204460492503131E-16f64

Source§

fn classify(self) -> FpCategory

Source§

fn is_normal(self) -> bool

Source§

fn is_sign_positive(self) -> bool

Source§

fn is_sign_negative(self) -> bool

Source§

fn signum(self) -> Self

Source§

fn integer_decode(self) -> (u64, i16, i8)

Implementors§

Source§

impl<T, C> BaseEncoding for Constrained<T, C>
where T: Primitive,