Skip to content

ceilDiv

Subhajit Sahu edited this page Aug 9, 2022 · 4 revisions

Perform ceiling-divison of two bigints.

Similar: floorDiv, ceilDiv, roundDiv.


function ceilDiv(x, y)
// x: dividend
// y: divisor

const xbigint = require('extra-bigint');


xbigint.ceilDiv(15n, 4n);
// → 4n

xbigint.ceilDiv(2n, 2n);
// → 1n

xbigint.ceilDiv(-15n, 4n);
// → -3n


References

Clone this wiki locally