Euclidean algorithm for integers
整数辗转相除法
Meaning in context
Repeatedly replace a nonnegative integer pair with while ; when , the terminal first coordinate is the gcd of the original pair, including by convention.
对非负整数对 ,当 时反复替换为 ;当 时,终止数对的第一个坐标 就是原数对的最大公因数,包括约定的 。
Example
gives gcd .
Usage and distinctions
The extended algorithm additionally computes integer linear-combination coefficients; ordinary remainder iteration computes only the gcd.
Read the encyclopedia explanation
Recommended reading in this subject · Preparation & skip guidance
Definition sources
- Thomas W. Judson — Abstract Algebra: Theory and ApplicationsSubsection 2.2.1, The Euclidean Algorithm, Example 2.2.4 · Checked 2026-10-14
Translation sources
- 张神星 — 初等数论习题课,中国科学院大学课程讲义,合肥工业大学托管第一章,4 补充,printed page 2, proof naming 辗转相除法 · Checked 2026-10-14