Euclidean algorithm
Euclid's Algorithm
<
algorithm> (Or "Euclidean Algorithm") An
algorithm for finding the
greatest common divisor 12, 12 so the GCD of 132 and 168 is 12.
This algorithm requires only subtraction and comparison operations but can take a number of steps proportional to the difference between the initial numbers (e.g. gcd(1, 1001) will take 1000 steps).
(1997-06-30)
(c) Copyright 1993 by Denis Howe