Trait float_cmp::Ulps [] [src]

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

A trait for floating point numbers which computes the number of representable values or ULPs (Units of Least Precision) that separate the two given values.

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.

Implementations on Foreign Types

impl Ulps for f32
[src]

[src]

impl Ulps for f64
[src]

[src]

Implementors