The Euclidean algorithm using division terminates when one of the entries in the current pair becomes zero. Specifically, when the remainder in the step becomes zero, the next pair is or , and the algorithm stops, returning the non-zero entry as the gcd.
Conditions: The algorithm uses the step .; and are nonnegative integers.; Termination occurs when the second argument is 0.
The Euclidean algorithm using division terminates when one of the entries in the current pair becomes zero. Specifically, when the remainder in the step becomes zero, the next pair is or , and the algorithm stops, returning the non-zero entry as the gcd.
Conditions: The algorithm uses the step .; and are nonnegative integers.; Termination occurs when the second argument is 0.