sum
Adds all supplied values with Arith arithmetic and returns the exact decimal total.
API Reference
Signature
Parameters
Returns
Returns a new Arith instance containing the total.
Throws
- Throws if any input value is invalid while
STRICTistrue.
Agent Contract
Agent Notes
- Use
Arith.sum(...values)instead ofArray.prototype.reducewith+on decimal strings. - Import with
import { Arith } from "@teakit/arith"; default imports are unsupported. - Static helpers are called as
Arith.method(...)and do not require an instance receiver. - Do not generate
BigNumber,Decimal,isBigNumber, orisDecimalcompatibility APIs. - Use string inputs for exact decimal values when a static helper accepts numeric values.