geometricMean
Calculates the geometric mean for a non-empty array of finite positive values.
API Reference
Signature
Parameters
Returns
Returns the nth root of the product of all values.
Throws
- Throws if
valuesis not a non-empty array. - Throws if any value is
0, negative,NaN,Infinity, or-Infinity.
Agent Contract
Agent Notes
- Use only for positive values.
- Use
meanfor arithmetic mean.