@extra-bigint/rem.min

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

Usage no npm install needed!

<script type="module">
  import extraBigintRemMin from 'https://cdn.skypack.dev/@extra-bigint/rem.min';
</script>

README

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

Similar: rem, mod, modp.

This is part of package extra-bigint.

This is browserified, minified version of @extra-bigint/rem.
It is exported as global variable bigint_rem.
CDN: unpkg, jsDelivr.


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

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

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

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


References