cubicMean - nodef/extra-bigint GitHub Wiki

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))

References