[][src]Trait float_cmp::Ulps

pub trait Ulps {
    type U: Copy;
    fn ulps(&self, other: &Self) -> Self::U;
fn next(&self) -> Self;
fn prev(&self) -> Self; }

Associated Types

type U: Copy

Loading content...

Required methods

fn ulps(&self, other: &Self) -> Self::U

The number of representable values or ULPs (Units of Least Precision) that separate self and other. The result U is an integral value, and will be zero if self and other are exactly equal.

fn next(&self) -> Self

The next representable number above this one

fn prev(&self) -> Self

The previous representable number below this one

Loading content...

Implementors

impl Ulps for f32[src]

type U = i32

impl Ulps for f64[src]

type U = i64

Loading content...