Skip to main content

rational_reconstruct

Function rational_reconstruct 

Source
pub fn rational_reconstruct(
    x: &BigUint,
    m: &BigUint,
) -> Option<(BigInt, BigInt)>
Expand description

Recover the unique reduced p/q with |p|, |q| <= sqrt(M/2) and p ≡ q·x (mod M), or None if none exists within the bound.