gcdlcm
v1.0.1
Published
Literally, two functions `gcd` & `lcm`.
Downloads
19
Readme
gcdlcm
Literally, two functions gcd
& lcm
.
Installation
You can install with npm:
$ npm install gcdlcm
Or with yarn:
$ yarn add gcdlcm
Usage
const { gcd, lcm } = require("gcdlcm");
gcd(3, 5) // 1
gcd(8, 5) // 1
gcd(8, 6) // 2
lcm(3, 5) // 15
lcm(8, 6) // 24
GCD & LCM
gcd = "Greatest Common Divisor" = The largest number that divides into both of two other numbers
lcm = "Least Common Multiple" = The smallest number that both of two other numbers divide into