Dijkstra's Algorithm for finding the GCD of a number states that, if m > n, then GCD(m,n) equals GCD(m-n,n). The reason for this is, if m/d and n/d both have no remainder, then (m-n)/d leaves no remainder (this is very clever. Dijkstra was a very smart man). This leads to the algorithm that
For m,n > 0, gcd(m,n) =
m if m=n
gcd(m - n,n) if m > n
gcd(m,n-m) if m < n