gcd
Returns the greatest common divisor of a and b.
Signs are ignored and the result is never negative. gcd(0, 0) is 0. Throws ArithmeticException when the result does not fit in Int, which happens only when it equals 2^31 (for example gcd(Int.MIN_VALUE, 0)).
Returns the greatest common divisor of a and b.
Signs are ignored and the result is never negative. gcd(0L, 0L) is 0L. Throws ArithmeticException when the result does not fit in Long, which happens only when it equals 2^63 (for example gcd(Long.MIN_VALUE, 0L)).