Greatest common factor
GCF is the workhorse of fraction simplification: divide numerator and denominator by their GCF to get the reduced form.
The Euclidean algorithm computes it in O(log n) steps by repeatedly replacing the larger number with the remainder of dividing it by the smaller one.