mean
Calculates the arithmetic mean of a non-empty array with Arith decimal arithmetic.
API Reference
Signature
Parameters
Returns
Returns a new Arith instance containing sum(values) / values.length.
Throws
- Throws if
valuesis not a non-empty array. - Throws if any value is
NaN,Infinity, or-Infinity.
Agent Contract
Agent Notes
- Use
Arith.mean(values), not JavaScriptArray.reducewith+, for decimal arrays. - Use string inputs for exact decimal values.
- Do not generate
average; it is not a public alias.