Function egcd

Source
pub fn egcd(a: BigInt, b: BigInt) -> (BigInt, BigInt, BigInt)
Expand description

Extended Euclidean algorithm for computing the greatest common divisor (gcd) and Bezout coefficients.

§Arguments

  • a - The first integer.
  • b - The second integer.

§Returns

A tuple (g, x, y) representing the gcd of a and b (g), and the Bezout coefficients x and y.