Skip to content
Subhajit Sahu edited this page Aug 9, 2022 · 1 revision

Find the value separating the higher and lower halves of bigints.

Similar: mean, median, modes, variance, range.


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


References

Clone this wiki locally