Home | History | Annotate | Download | only in util

Lines Matching refs:lcm

1141      * using the formula <code>lcm(a,b) = (a / gcd(a,b)) * b</code>.
1145 * <li>The invocations <code>lcm(Integer.MIN_VALUE, n)</code> and
1146 * <code>lcm(n, Integer.MIN_VALUE)</code>, where <code>abs(n)</code> is a
1149 * <li>The result of <code>lcm(0, x)</code> and <code>lcm(x, 0)</code> is
1161 public static int lcm(int a, int b) {
1165 int lcm = FastMath.abs(mulAndCheck(a / gcd(a, b), b));
1166 if (lcm == Integer.MIN_VALUE) {
1171 return lcm;
1177 * using the formula <code>lcm(a,b) = (a / gcd(a,b)) * b</code>.
1181 * <li>The invocations <code>lcm(Long.MIN_VALUE, n)</code> and
1182 * <code>lcm(n, Long.MIN_VALUE)</code>, where <code>abs(n)</code> is a
1185 * <li>The result of <code>lcm(0L, x)</code> and <code>lcm(x, 0L)</code> is
1196 public static long lcm(long a, long b) {
1200 long lcm = FastMath.abs(mulAndCheck(a / gcd(a, b), b));
1201 if (lcm == Long.MIN_VALUE){
1206 return lcm;