xgcd

xgcd(a, b)

Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.

Try it yourself:

See also:
All functions