The Euclidean Algorithm is a simple means by which the greatest common
divisor (GCD) of two positive integers may be found.
The Java applet below makes use of the BigInteger class
and thus should handle arbitrarily large integers.
If you find a case in which the applet fails to function or gives
erroneous results, please send me the values of A and B
which you entered and the contents of your Java console.
My modest goal is to have this applet run reliably and accurately.
The Euclidean Algorithm: Let a and b be integers with a>=b>0 and set r-1=a, r0=b. By repeatedly applying the Division Algorithm, we get rj-1=rj qj+1 + rj+1 with 0 < rj+1 < rj for all 0 <=j < n, where n is the least non-negative number such that rn+1 = 0, in which case gcd(a,b) = rn.