double
GeometricMean(
double
[]
values
)
Compute the geometric mean of the values.
H
=
x
i
n
i
n
Example
=
Block
{
ShowGeometricMean
([1, 2, 4, 8, 16]);
ShowGeometricMean
([2, 5, 6, 12, 18]);
};
The geometric mean of 1, 2, 4, 8 and 16 is 4
The geometric mean of 2, 5, 6, 12 and 18 is 6.64539805948974