cubicMean - nodef/extra-math GitHub Wiki

Find the cubic mean of numbers.

Similar: arithmeticMean, geometricMean, harmonicMean, quadriaticMean, cubicMean.

function cubicMean(...xs)
// xs: a list of numbers
const xmath = require('extra-math');


xmath.cubicMean(1, 2);
// → 1.6509636244473134  (Math.cbrt(9/2))

xmath.cubicMean(1, 2, 3);
// → 2.2894284851066637  (Math.cbrt(36/3))

xmath.cubicMean(1, 2, 3, 4);
// → 2.924017738212866  (Math.cbrt(100/4))

References