Previous Up Next

5.5.3 The least common multiple: lcm

The lcm command finds the least common multiple (LCM) of a set of integers or polynomials. (See also Section 5.28.8 for polynomials.)


With one argument:

Examples


With two arguments:

Example

Input:

lcm([6,10,12],[21,5,8])

or:

lcm([[6,10,12],[21,5,8]])

Output:


42,10,24

Previous Up Next