-
Notifications
You must be signed in to change notification settings - Fork 2
rem
Subhajit Sahu edited this page Aug 9, 2022
·
4 revisions
Find the remainder of x/y with sign of x (truncated division).
function rem(x, y)
// x: dividend
// y: divisor
const xbigint = require('extra-bigint');
xbigint.rem(1n, 10n);
// → 1n
xbigint.rem(-1n, 10n);
// → -1n
xbigint.rem(1n, -10n);
// → 1n