Description Usage Arguments Value Examples
The least common multiple is defined as the smallest possible positive integer that is divisible by both a and b, and is usually denoted lcm(a,b) or LCM(a,b). The function implementation for finding the least common multiple takes advantage of the relation between the greatest common divisor and the least common multiple, such that:
lcm(a,b) = \bigg(\frac{|a|}{gcd(a,b)} \bigg) \space |b|
1 | lcm(a, b)
|
a |
First integer |
b |
Second integer |
the least common multiple of the two given integers
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.