RealRugStrictFinite

Type Alias RealRugStrictFinite 

Source
pub type RealRugStrictFinite<const PRECISION: u32> = RealValidated<RugStrictFinite<PRECISION>>;
Expand description

A type alias for a validated real scalar using the Rug kernel with a specified precision and the NumKernelStrictFinite validation policy.

Aliased Type§

pub struct RealRugStrictFinite<const PRECISION: u32> { /* private fields */ }

Trait Implementations§

Source§

impl<const PRECISION: u32> AbsDiffEq for RealRugStrictFinite<PRECISION>

Source§

fn default_epsilon() -> Self::Epsilon

Returns the machine epsilon for the given precision.

For rug::Float, this is 2^(1-PRECISION), which represents the smallest difference between 1.0 and the next representable value.

Source§

fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool

Compares two values for approximate equality using absolute difference.

Returns true if |self - other| <= epsilon.

Source§

type Epsilon = AbsoluteTolerance<RealValidated<NumKernelStrictFinite<Float, PRECISION>>>

Used for specifying relative comparisons.
Source§

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of AbsDiffEq::abs_diff_eq.
Source§

impl<const PRECISION: u32> RelativeEq for RealRugStrictFinite<PRECISION>

Source§

fn default_max_relative() -> Self::Epsilon

Returns a reasonable default for relative comparisons.

Uses epsilon() * 8 as a default, allowing for a few ULPs of error.

Source§

fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool

Compares two values for approximate equality using relative difference.

Returns true if |self - other| <= max(epsilon, max_relative * max(|self|, |other|)).

Source§

fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool

The inverse of RelativeEq::relative_eq.