extgcd

Compute the gcd and solve Bezout's identity using the extended Euclidean algorithm.