-
Notifications
You must be signed in to change notification settings - Fork 2
cubicMean
Subhajit Sahu edited this page Aug 9, 2022
·
2 revisions
Find the cubic mean of bigints.
Similar: arithmethicMean, geometricMean, harmonicMean, quadriaticMean, cubicMean.
function cubicMean(...xs)
// xs: bigints
const xbigint = require('extra-bigint');
xbigint.cubicMean(1n, 2n);
// → 1n (Math.cbrt(9/2))
xbigint.cubicMean(1n, 2n, 3n);
// → 2n (Math.cbrt(36/3))
xbigint.cubicMean(1n, 2n, 3n, 4n);
// → 2n (Math.cbrt(100/4))