pub trait FactorizationResidual:
Eq
+ Clone
+ Debug {
// Required methods
fn one() -> Self;
fn is_one(&self) -> bool;
}Expand description
The part of a value that a factorization did not decompose.
A residual of one means that nothing was left over, so the factors describe the value exactly.
This trait is deliberately weaker than num_traits::One: it demands no multiplication,
because the residual of a rational factorization is a (numerator, denominator) pair, which has
no meaningful product.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<Numerator, Denominator> FactorizationResidual for (Numerator, Denominator)where
Numerator: FactorizationResidual,
Denominator: FactorizationResidual,
A rational number leaves a residual on both sides of the fraction.
impl<Numerator, Denominator> FactorizationResidual for (Numerator, Denominator)where
Numerator: FactorizationResidual,
Denominator: FactorizationResidual,
A rational number leaves a residual on both sides of the fraction.
The two halves are (numerator residual, denominator residual); they can’t be merged into a
single value, as that value would generally not be an integer.
Implementors§
impl<const S: usize> FactorizationResidual for Ubig<S>
A big integer that was not decomposed entirely leaves a big integer behind.