Algosim documentation: lcm

lcm

The least common multiple function.

Syntax

Description

lcm(n[, ...]) is the smallest positive integer that is divisible by each argument. If any of the integers is 0, the result is 0.

Examples

lcm(50, 75)
150
lcm(2382380, 2999535)
2651588940
lcm(50, 75, 100)
300
lcm(50, 75, 100, −25)
300
lcm(50, 75, 100, −25, 0)
0

See also