pub trait UlpFloat: Copy {
const MAX_ULP: u64;
const SIGN_MASK: u64;
// Required methods
fn ulp_bits(self) -> u64;
fn ulp_is_nan(self) -> bool;
// Provided methods
fn ulp_magnitude_bits(self) -> u64 { ... }
fn ulp_is_sign_negative(self) -> bool { ... }
}Expand description
Floating point types for which an integer ULP distance is defined.
Required Associated Constants§
Required Methods§
Sourcefn ulp_bits(self) -> u64
fn ulp_bits(self) -> u64
Raw bit pattern, widened to u64.
Within a single sign, the bit patterns of finite floats are monotonic in magnitude, which is what makes the subtraction below meaningful.
fn ulp_is_nan(self) -> bool
Provided Methods§
Sourcefn ulp_magnitude_bits(self) -> u64
fn ulp_magnitude_bits(self) -> u64
Bit pattern with the sign bit cleared, i.e. the bits of |self|.
fn ulp_is_sign_negative(self) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".