Trait approx::UlpsEq [−][src]
pub trait UlpsEq: AbsDiffEq { fn default_max_ulps() -> u32; fn ulps_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_ulps: u32
) -> bool; fn ulps_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_ulps: u32
) -> bool { ... } }
Equality comparisons between two numbers using both the absolute difference and ULPs (Units in Last Place) based comparisons.
Required Methods
fn default_max_ulps() -> u32
The default ULPs to tolerate when testing values that are far-apart.
This is used when no max_ulps
value is supplied to the ulps_eq
macro.
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
A test for equality that uses units in the last place (ULP) if the values are far apart.
Provided Methods
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
The inverse of ApproxEq::ulps_eq
.
Implementations on Foreign Types
impl UlpsEq for f32
[src]
impl UlpsEq for f32
impl UlpsEq for f64
[src]
impl UlpsEq for f64
impl<'a, T: UlpsEq + ?Sized> UlpsEq for &'a T
[src]
impl<'a, T: UlpsEq + ?Sized> UlpsEq for &'a T
impl<'a, T: UlpsEq + ?Sized> UlpsEq for &'a mut T
[src]
impl<'a, T: UlpsEq + ?Sized> UlpsEq for &'a mut T
impl<T: UlpsEq + Copy> UlpsEq for Cell<T>
[src]
impl<T: UlpsEq + Copy> UlpsEq for Cell<T>
impl<T: UlpsEq + ?Sized> UlpsEq for RefCell<T>
[src]
impl<T: UlpsEq + ?Sized> UlpsEq for RefCell<T>
impl<T: UlpsEq> UlpsEq for [T] where
T::Epsilon: Clone,
[src]
impl<T: UlpsEq> UlpsEq for [T] where
T::Epsilon: Clone,
impl<T: UlpsEq> UlpsEq for Complex<T> where
T::Epsilon: Clone,
[src]
impl<T: UlpsEq> UlpsEq for Complex<T> where
T::Epsilon: Clone,