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