Skip to main content

extended_gcd

Function extended_gcd 

Source
pub fn extended_gcd(a: i64, b: i64) -> (i64, i64, i64)
Expand description

Extended Euclidean algorithm.

Returns (g, x, y) such that a*x + b*y == g == gcd(a, b).