Package: effect
Module: BigInt
Determines the least common multiple of two bigints.
When to use
Use to compute the least common multiple of two integer values.
Example (Calculating least common multiples)
import { BigInt } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(BigInt.lcm(2n, 3n), 6n)
assert.deepStrictEqual(BigInt.lcm(2n, 4n), 4n)
assert.deepStrictEqual(BigInt.lcm(16n, 24n), 48n)
See
gcd for computing the greatest common divisorSignature
declare const lcm: { (that: bigint): (self: bigint) => bigint; (self: bigint, that: bigint): bigint; }
Since v2.0.0