List of utility methods to do Long LCM
long | lcm(long a, long b) Returns the least common multiple of the absolute value of two numbers, using the formula lcm(a,b) = (a / gcd(a,b)) * b . if (a == 0 || b == 0) { return 0; long lcm = FastMath.abs(ArithmeticUtils.mulAndCheck(a / gcd(a, b), b)); if (lcm == Long.MIN_VALUE) { throw new MathArithmeticException( LocalizedFormats.LCM_OVERFLOW_64_BITS, a, b); ... |