Lehmer's GCD algorithm: Difference between revisions

Content deleted Content added
References: changed "stub" to "expand"
m Algorithm: mv ,
Line 13:
\begin{bmatrix} A & B & x\\ C & D & y \end{bmatrix}
</math> to an extended [[identity matrix]] <math>\textstyle
\begin{bmatrix} 1 & 0 & x \\ 0 & 1 & y\end{bmatrix},
</math>,
*:and perform the euclidean algorithm simultaneously on the pairs (''x''&nbsp;+&nbsp;''A'',&nbsp;''y''&nbsp;+&nbsp;''C'') and (''x''&nbsp;+&nbsp;''B'',&nbsp;''y''&nbsp;+&nbsp;''D''), until the quotients differ. That is, iterate as an ''inner loop'':
*:* Compute the quotients ''w''<sub>1</sub> of the long divisions of (''x'' + ''A'') by (''y'' + ''C'') and ''w''<sub>2</sub> of (''x'' + ''B'') by (''y'' + ''D'') respectively. Also let ''w'' be the (not computed) quotient from the current long division in the chain of long divisions of the euclidean algorithm.