Description
Calculates the greatest common divisor between a list of expressions.
The greatest common divisor is the biggest number that divides each of the arguments to produce
a result in Z. In the example above, 3213 / 3 = 1071 and 24 / 3 = 8.
The famous Euclide's algorithm to find the greatest common divisor is:
while ( x != 0 ) {
t = x mod y;
x = y;
y = t;
}
Gcd = x;
|