pub struct ExtendedGcd<A> {
pub gcd: A,
pub x: A,
pub y: A,
}Expand description
Greatest common divisor and Bézout coefficients
let e = isize::extended_gcd(a, b);
assert_eq!(e.gcd, e.x*a + e.y*b);ExtendedGcd in num_integer - Rust
pub struct ExtendedGcd<A> {
pub gcd: A,
pub x: A,
pub y: A,
}Greatest common divisor and Bézout coefficients
let e = isize::extended_gcd(a, b);
assert_eq!(e.gcd, e.x*a + e.y*b);