LCM

The LCM function returns the Least Common Multiple of the integers passed as arguments.

Syntax

LCM(
    number1
    [, number2...]
)

Parameters
  • number: Numbers to consider in the calculation.
Returned value

The LCM function returns an integer.

Additional Information

The LCM function supports between 1 and 255 arguments.

If any of the arguments is not a number or is less than zero, the function will return an error. If any of the arguments are zero, the LCM function returns zero.

True values are interpreted as 1 and False values as 0.

Examples

In this example, the Least Common Multiple of the numbers 14 and 6 is calculated. The first can be decomposed as 14 = 7 * 2 and the second as 6 = 3 * 2, so the result is 2 * 3 * 7 = 42:

LCM function. Example of use

Related functions
Category
Mathematical and trigonometric
Submitted by admin on Tue, 12/04/2018 - 12:29