uint
uint copied to clipboard
`modular`: Reduce larger bit-sizes to smaller ones.
On 2022-06-03 @recmo wrote in 2f6a5d6
“Merge pull request #103 from recmo/mulmod”:
Reduce larger bit-sizes to smaller ones.
/// ⚠️ Compute $\mod{\mathtt{self}}_{\mathtt{modulus}}$.
///
/// **Warning.** This function is not part of the stable API.
///
/// Returns zero if the modulus is zero.
// FEATURE: Reduce larger bit-sizes to smaller ones.
#[must_use]
pub fn reduce_mod(mut self, modulus: Self) -> Self {
if modulus == Self::ZERO {
return Self::ZERO;
}
From src/modular.rs:14