Trait float_cmp::Ulps

source ·
pub trait Ulps {
    type U: Copy;

    fn ulps(&self, other: &Self) -> <Self as Ulps>::U;
    fn next(&self) -> Self;
    fn prev(&self) -> Self;
}

Required Associated Types§

Required Methods§

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.

The next representable number above this one

The previous representable number below this one

Implementations on Foreign Types§

Implementors§