Previous Up Next

7.1.3  Least common multiple

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

Examples

lcm(18,15)
     
90           
lcm(-5-12*i,11-10*i)
     
−53+8 i           
lcm(18,15,21,36)
     
1260           
lcm([18,15,21,36])
     
1260           
lcm([6,10,12],[21,5,8])

or:

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

42,10,24
          

Previous Up Next