LCM: Compute the least common multiple of two numbers.

View source: R/LCM.R

LCMR Documentation

Compute the least common multiple of two numbers.

Description

A simple algorithm to compute the least common multiple of two numbers

Usage

LCM(x, y)

Arguments

x

an object of class numeric

y

an object of class numeric

Value

The least common multiple of x and y.

Examples

LCM(5,7)
LCM(5,8)
LCM(5,9)
LCM(5,10)
Reduce(LCM, 1:10) # -> 2520

dkahle/mpoly documentation built on Nov. 21, 2024, 8:27 a.m.