Trait float_cmp::ApproxEqUlps
[−]
[src]
pub trait ApproxEqUlps: Ulps { fn approx_eq_ulps(&self, other: &Self, ulps: Self::U) -> bool; fn approx_ne_ulps(&self, other: &Self, ulps: Self::U) -> bool { ... } }
ApproxEqUlps is a trait for approximate equality comparisons, and is defined only for floating point types.
Required Methods
fn approx_eq_ulps(&self, other: &Self, ulps: Self::U) -> bool
This method tests for self
and other
values to be approximately equal
within ULPs (Units of Least Precision) floating point representations.
Provided Methods
fn approx_ne_ulps(&self, other: &Self, ulps: Self::U) -> bool
This method tests for self
and other
values to be not approximately
equal within ULPs (Units of Least Precision) floating point representations.