pub trait MachineConstants: Float + Debug {
// Required methods
fn machine_epsilon() -> Self;
fn min_positive_normal() -> Self;
fn max_finite() -> Self;
fn min_positive_subnormal() -> Self;
fn mantissa_digits() -> u32;
// Provided method
fn radix() -> u32 { ... }
}Expand description
Machine-specific constants for a floating-point type.
Provides type-level access to epsilon, minimum/maximum normal values, minimum positive subnormal, and radix information.
Required Methods§
Sourcefn machine_epsilon() -> Self
fn machine_epsilon() -> Self
Machine epsilon (difference between 1.0 and the next representable value).
Sourcefn min_positive_normal() -> Self
fn min_positive_normal() -> Self
Smallest positive normal number.
Sourcefn max_finite() -> Self
fn max_finite() -> Self
Largest finite number.
Sourcefn min_positive_subnormal() -> Self
fn min_positive_subnormal() -> Self
Smallest positive subnormal number (closest to zero without being zero).
Sourcefn mantissa_digits() -> u32
fn mantissa_digits() -> u32
Number of significand (mantissa) bits.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".