Skip to main content

crt

Function crt 

Source
pub fn crt(residues: &[BigInt], moduli: &[BigInt]) -> Option<BigInt>
Expand description

Chinese Remainder Theorem: the unique x in [0, ∏mᵢ) with x ≡ residuesᵢ (mod moduliᵢ) for pairwise-coprime moduli, or None if a modular inverse fails (moduli not coprime).