On 28 February 2008, I gave a micro-talk to the Atlanta Perl Mongers on the Euclidean Algorithm. The talk shows how the Euclidean Algorithm can be used to find the greatest common divisor (GCD) of two positive integers. The talk describes the algorithm, explains how it works, shows a simple Perl implementation, and presents numerical examples of how the algorithm computes the GCD. A handout for the talk is available for download in Acrobat (.pdf) format.
[Handout for "Euclidean Algorithm" talk (96 KB)]
Revision history:
29 February 2008: changed variable names in the code to better follow the explanation; shortened code and added additional explanatory text
28 February 2008: original handout
This document is licensed under the Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License.