extended euclidean algorithm
1
Calculate the greatest common divisor or the multiplicative inverse in a group.