Investment Studio > Expressions > Functions > Math & Trig > LCM

integer lcm(integer data [, ...])

Returns the Least Common Multiple of two or more integers.

The least common multiple is the smallest positive integer that is a multiple of all arguments.

The input data may include arrays, in which case each array element will be treated as a separate argument.

Examples

=lcm(4, 6)

equals 12

=lcm({6, 9}, 18)

equals 18.

See also gcd.