BigInteger.gcd

Returns a BigInteger whose value is the greatest common divisor of {@code abs(this)} and {@code abs(val)}. Returns 0 if {@code this == 0 && val == 0}.

@param val value with which the GCD is to be computed. @return {@code GCD(abs(this), abs(val))}

class BigInteger
gcd

Meta