pub trait UlpsEq<Rhs = Self>: AbsDiffEq<Rhs> where
    Rhs: ?Sized
{ fn default_max_ulps() -> u32;
fn ulps_eq(
        &self,
        other: &Rhs,
        epsilon: Self::Epsilon,
        max_ulps: u32
    ) -> bool; fn ulps_ne(
        &self,
        other: &Rhs,
        epsilon: Self::Epsilon,
        max_ulps: u32
    ) -> bool { ... } }
Expand description

Equality comparisons between two numbers using both the absolute difference and ULPs (Units in Last Place) based comparisons.

Required methods

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.

A test for equality that uses units in the last place (ULP) if the values are far apart.

Provided methods

The inverse of UlpsEq::ulps_eq.

Implementations on Foreign Types

Implementors