
igcdex - extended Euclidean algorithm for integers

Calling sequence:
igcdex(integer_1, integer_2)

Parameter:

integer_1, integer_2    --  integers

Summary:

igcdex(a, b) calculates the greatest common positive divisor d of the numbers
a and b as well as the integers x and y, for which d = a*x + b*y is valid,
using the extended Eucledean algorithm. The expression sequence d, x, y
is returned. igcdex(0, 0) returns the sequence 0, 1, 0.

If one of the arguments is a number but not an integer then igcdex returns
an error. igcdex returns the call with evaluated arguments when one of the
arguments is not a number. igcdex is a kernel function.

>>  igcdex(-10, 6);

     2, 1, 2

>>  igcdex(3839882200, 654365735423132432848652680);

      109710920, -681651885490791809, 4

See also:  igcd, ilcm

