Extended Euclidean algorithm

Home > Mathematics > Number theory > Euclidean algorithm > Extended Euclidean algorithm

The extended version not only calculates the GCD of two integers but also returns two integers x and y that satisfy the equation ax + by = gcd(a, b).