std_traits::num

Trait Float

source
pub trait Float: Number {
    type Unsigned: Unsigned;
Show 17 associated constants and 3 methods const RADIX: u32; const MANTISSA_DIGITS: u32; const DIGITS: u32; const EPSILON: Self; const MIN_FINITE: Self; const MIN_POSITIVE_SUBNORMAL: Self; const MIN_POSITIVE_NORMAL: Self; const MIN_EXP: i32; const MIN_10_EXP: i32; const MAX_FINITE: Self; const MAX_NEGATIVE_SUBNORMAL: Self; const MAX_NEGATIVE_NORMAL: Self; const MAX_EXP: i32; const MAX_10_EXP: i32; const NAN: Self; const INFINITY: Self; const NEG_INFINITY: Self; // Required methods fn from_unsigned(unsigned: Self::Unsigned) -> Self; fn to_unsigned(self) -> Self::Unsigned; fn classify(self) -> FpCategory;
}

Required Associated Constants§

Required Associated Types§

Required Methods§

source

fn from_unsigned(unsigned: Self::Unsigned) -> Self

from_bits

source

fn to_unsigned(self) -> Self::Unsigned

to_bits

source

fn classify(self) -> FpCategory

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 Float for f32

source§

const RADIX: u32 = 2u32

source§

const MANTISSA_DIGITS: u32 = 24u32

source§

const DIGITS: u32 = 6u32

source§

const EPSILON: Self = 1.1920929E-7f32

source§

const MIN_FINITE: Self = -3.40282347E+38f32

source§

const MIN_POSITIVE_SUBNORMAL: Self = 1.40129846E-45f32

source§

const MIN_POSITIVE_NORMAL: Self = 1.17549435E-38f32

source§

const MIN_EXP: i32 = -125i32

source§

const MIN_10_EXP: i32 = -37i32

source§

const MAX_FINITE: Self = 3.40282347E+38f32

source§

const MAX_NEGATIVE_SUBNORMAL: Self = -1.40129846E-45f32

source§

const MAX_NEGATIVE_NORMAL: Self = -1.17549435E-38f32

source§

const MAX_EXP: i32 = 128i32

source§

const MAX_10_EXP: i32 = 38i32

source§

const NAN: Self = NaN_f32

source§

const INFINITY: Self = +Inf_f32

source§

const NEG_INFINITY: Self = -Inf_f32

source§

type Unsigned = u32

source§

fn from_unsigned(unsigned: Self::Unsigned) -> Self

source§

fn to_unsigned(self) -> Self::Unsigned

source§

fn classify(self) -> FpCategory

source§

impl Float for f64

source§

const RADIX: u32 = 2u32

source§

const MANTISSA_DIGITS: u32 = 53u32

source§

const DIGITS: u32 = 15u32

source§

const EPSILON: Self = 2.2204460492503131E-16f64

source§

const MIN_FINITE: Self = -1.7976931348623157E+308f64

source§

const MIN_POSITIVE_SUBNORMAL: Self = 4.9406564584124654E-324f64

source§

const MIN_POSITIVE_NORMAL: Self = 2.2250738585072014E-308f64

source§

const MIN_EXP: i32 = -1_021i32

source§

const MIN_10_EXP: i32 = -307i32

source§

const MAX_FINITE: Self = 1.7976931348623157E+308f64

source§

const MAX_NEGATIVE_SUBNORMAL: Self = -4.9406564584124654E-324f64

source§

const MAX_NEGATIVE_NORMAL: Self = -2.2250738585072014E-308f64

source§

const MAX_EXP: i32 = 1_024i32

source§

const MAX_10_EXP: i32 = 308i32

source§

const NAN: Self = NaN_f64

source§

const INFINITY: Self = +Inf_f64

source§

const NEG_INFINITY: Self = -Inf_f64

source§

type Unsigned = u64

source§

fn from_unsigned(unsigned: Self::Unsigned) -> Self

source§

fn to_unsigned(self) -> Self::Unsigned

source§

fn classify(self) -> FpCategory

Implementors§