Skip to main content

Real

Trait Real 

Source
pub trait Real: RealNum + CField<Fixed = Self> { }
Expand description

A real-number field: totally ordered, and its own involution fixed field (Fixed = Self, so conj = id).

Implementors (R64, R32) carry a tolerance in their PartialEq/ PartialOrd: two values within a relative epsilon compare equal, so that floating-point round-off doesn’t fracture geometric equality. That tolerance is deliberately not transitive (a ≈ b and b ≈ c does not give a ≈ c), which is fine for equality testing but wrong for the strict, transitive order an iterative algorithm needs to decide convergence — hence ExactCmp, which recovers the genuine order from the sign bit instead of the tolerant comparison.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<R: RealNum + CField<Fixed = Self>> Real for R