 The prototypical example of an algorithm in mathematics (see also entry on  computability and complexity)  is Euclid’s recipe for finding the greatest common divisor (GCD) of two positive whole numbers \(A\) and \(B\). The GCD of two numbers is the greatest number that divides both numbers without residue.