Comment Comment by conistonwater I think you misunderstood the Euclidean algorithm. The basic iteration is of the form gcd(a, b) = gcd(b, a mod b), and there is no need to compute mod with anything other than %. parent conistonwater 12 years ago