1.0.1 • Published 4 years ago

gcdlcm v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

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