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
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.