[][src]Trait nikisas_test::float::FloatExt

pub trait FloatExt: SampleUniform + Copy + Debug + Default + PartialOrd<Self> + Add<Self, Output = Self> + Sub<Self, Output = Self> + Mul<Self, Output = Self> + Div<Self, Output = Self> {
    fn nextup(self) -> Self;
fn nextdown(self) -> Self;
fn decompose(self) -> (Self, i32);
fn floats_between(self, other: Self) -> u64; }

Trait for all operations on floating point numbers that are required by the crate. It also define some useful methods like nextup, decompose or floats_between.

Required methods

fn nextup(self) -> Self

Gives the next machine number after self.

fn nextdown(self) -> Self

Gives the previous machine number before self.

fn decompose(self) -> (Self, i32)

Decomposes the floating number into real f and integer n, such that self = f * 2^n and 1 ≤ f < 2.

fn floats_between(self, other: Self) -> u64

Gets the total number of machine numbers between self and other.

Loading content...

Implementations on Foreign Types

impl FloatExt for f32[src]

impl FloatExt for f64[src]

Loading content...

Implementors

Loading content...