Basic number theory using the native BigInt arithmetic.
const { egcd } = await import('https://coins.github.io/numbers-js/numbers.js');
egcd(42n, 14n)
const { mod_inv } = await import('https://coins.github.io/numbers-js/numbers.js');
mod_inv(2n, 101n)
const { mod_exp } = await import('https://coins.github.io/numbers-js/numbers.js');
mod_exp(2n, 42n, 11n)
const { mod_sqrt } = await import('https://coins.github.io/numbers-js/numbers.js');
mod_sqrt(16n, 43n)