The harmonic mean of a set of numbers is the reciprocal
of the mean of the reciprocals of the numbers.
The function harmonicmean
calculates the harmonic mean
of x
. The algorithm robustly handles special cases
where some of the values in x
are very small or are
exactly equal to zero.
The function harmonicsum
calculates the reciprocal of the
sum of the reciprocals of the x
values.