precise-fractions
Version:
Allows for working with fractions.
17 lines (15 loc) • 304 B
TypeScript
/**
* Returns the greatest common divisor of two numbers.
*
* @param a
* @param b
*/
declare function gcd(a: bigint, b: bigint): bigint;
/**
* Returns the least common multiple of two numbers.
*
* @param a
* @param b
*/
declare function lcm(a: bigint, b: bigint): bigint;
export { gcd, lcm };