pub fn extended_gcd<T: Copy + Integer>(a: T, b: T) -> (T, T, T) {
	if a == T::zero() {
		(b, T::zero(), T::one())
	} else {
		let (gcd, x, y) = extended_gcd(b % a, a);
		(gcd, y - (b / a) * x, x)
	}
}
/// Compute the greatest common divisor of `a` and `b` using the Extended Euclidean Algorithm.
Compute the greatest common divisor of `a` and `b` using the Extended Euclidean Algorithm.
Compute the greatest common divisor of ` a ` and ` b ` using the Extended Euclidean Algorithm .
pub fn extended_gcd<T: Copy + Integer>(a: T, b: T) -> (T, T, T) {
	if a == T::zero() {
		(b, T::zero(), T::one())
	} else {
		let (gcd, x, y) = extended_gcd(b % a, a);
		(gcd, y - (b / a) * x, x)
	}
}
pub fn extended_gcd < T : Copy + Integer > ( a : T , b : T ) -> ( T , T , T ) { if a == T :: zero ( ) { ( b , T :: zero ( ) , T :: one ( ) ) } else { let ( gcd , x , y ) = extended_gcd ( b % a , a ) ; ( gcd , y - ( b / a ) * x , x ) } }
Compute the greatest common divisor of `a` and `b` using the Extended Euclidean Algorithm.
Compute the greatest common divisor of ` a ` and ` b ` using the Extended Euclidean Algorithm .
a
T
b
T
a
T
b
T