Expand description
GCD and LCM (the spreadsheet GCD / LCM functions).
Functionsยง
- gcd
- The greatest common divisor of
aandb(Euclid): it divides both, and every common divisor divides it.gcd(a, 0) == a, so folding from 0 gives the gcd of a list. - lcm_
below lcm(a, b)if it is belowcap, elseNone. Positiveaandb; the product is formed inu128, so the overflow check is exact:Noneexactly when the true lcm is at leastcap. A result is a positive common multiple ofaandb.