Two or more integers
The greatest common factor is computed with the Euclidean algorithm. For more than two integers the function is reduced iteratively. The least common multiple uses LCM(a, b) = |a × b| / GCD(a, b) with BigInt so the product does not overflow ordinary integers. Negatives are treated by their absolute values. GCD(n, 0) = |n|. An LCM that involves 0 is 0, which is the usual convention. This is distinct from the fraction calculator, which already uses Euclidean GCD to reduce two fractions.
GCF and LCM
GCF (GCD)—
LCM—
GCD(n, 0) = |n|. The LCM of a set that includes 0 is 0.