-
Notifications
You must be signed in to change notification settings - Fork 2
lcm
Subhajit Sahu edited this page Aug 9, 2022
·
2 revisions
Find the least common multiple of bigints.
function lcm(...xs)
// xs: a list of bigints
const xbigint = require('extra-bigint');
xbigint.lcm(2n, 3n);
// → 6n
xbigint.lcm(2n, 3n, 4n);
// → 12n
xbigint.lcm(2n, 3n, 4n, 5n);
// → 60n