Skip to content
Subhajit Sahu edited this page Sep 4, 2021 · 6 revisions

Gets remainder of x/y with +ve sign (euclidean division).
📦 NPM, 😺 GitHub, 🏃 RunKit, 🌔 Minified, 📜 Files, 📰 JSDoc, 📘 Wiki.

Similar: rem, mod, modp.


bigint.modp(x, y);
// x: dividend
// y: divisor
const bigint = require('extra-bigint');

bigint.modp(1n, 10n);
// 1n

bigint.modp(-1n, 10n);
// 9n

bigint.modp(1n, -10n);
// 1n


References

Clone this wiki locally