The base case for the Euclidean algorithm is when the second argument of the pair is zero. At this point, the algorithm stops, and the first argument is returned as the greatest common divisor.
Conditions: The algorithm is in the process of replacing pairs using .; The second argument has reached zero.
The base case for the Euclidean algorithm is when the second argument of the pair is zero. At this point, the algorithm stops, and the first argument is returned as the greatest common divisor.
Conditions: The algorithm is in the process of replacing pairs using .; The second argument has reached zero.