Go to the source code of this file.
Compute greatest-common-denominator.
Definition at line 3 of file gcd.cpp.
00004 { 00005 if (n < 0) 00006 n = -n; 00007 while (m != 0) { 00008 int tmp(n % m); 00009 n = m; 00010 m = tmp; 00011 } 00012 return n; 00013 }