How it works
The greatest common factor (also called the highest common factor or greatest common divisor) is the largest whole number that divides all the numbers exactly. The least common multiple is the smallest number that all of them divide into. Euclid's algorithm finds the GCF quickly even for very large numbers, and all arithmetic is done with exact integers.