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