We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Perform rounded-divison of two bigints.
Similar: floorDiv, ceilDiv, roundDiv.
function roundDiv(x, y) // x: divisor // y: dividend
const xbigint = require('extra-bigint'); xbigint.roundDiv(15n, 4n); // → 4n xbigint.roundDiv(2n, 2n); // → 1n xbigint.roundDiv(-15n, 4n); // → -4n
There was an error while loading. Please reload this page.