Skip to content
START WITH A QUESTION

What would you like to understand?

Find an answer. See the moment it becomes clear. Follow the idea further.

← Concept directory

Answers for “余数的大小如何确保向终止推进?”

1 keyword matches

Understanding your question. You can explore the search results below now.

Know when to use it

↗

The Euclidean algorithm using division terminates when one of the entries in the current pair (a,b)(a,b) becomes zero. Specifically, when the remainder rr in the step b=aq+rb=aq+r becomes zero, the next pair is (0,a)(0,a) or (a,0)(a,0), and the algorithm stops, returning the non-zero entry as the gcd.

Conditions: The algorithm uses the step gcd⁡(a,b)=gcd⁡(b,a mod b)\gcd(a,b) = \gcd(b, a \bmod b).; aa and bb are nonnegative integers.; Termination occurs when the second argument is 0.