Trait num_modular::DivExact
source · pub trait DivExact<Rhs, Precompute>: Sized {
type Output;
// Required method
fn div_exact(self, d: Rhs, pre: &Precompute) -> Option<Self::Output>;
}
Expand description
Utility function for exact division, with precomputed helper values
Available Pre-computation types:
()
: No pre-computation, the implementation relies on native integer division- PreModInv: With Pre-computed modular inverse
Required Associated Types§
Required Methods§
sourcefn div_exact(self, d: Rhs, pre: &Precompute) -> Option<Self::Output>
fn div_exact(self, d: Rhs, pre: &Precompute) -> Option<Self::Output>
Check if d divides self with the help of the precomputation. If d divides self, then the quotient is returned.