-
Notifications
You must be signed in to change notification settings - Fork 2
median
Subhajit Sahu edited this page Aug 9, 2022
·
1 revision
Find the value separating the higher and lower halves of bigints.
function median(...xs)
// xs: a list of bigints
const xbigint = require('extra-bigint');
xbigint.median(1n, 7n);
// → 4n
xbigint.median(1n, 7n, 8n);
// → 7n
xbigint.median(1n, 7n, 8n, 10n);
// → 7n