plus
Add another value.
Summary
Adds the supplied value and returns the exact decimal sum.
AI Contract
Signature
Parameters
Returns
Returns a new Arith instance. The receiver is not modified.
Behavior
- The receiver and argument are converted to
Arithvalues. - The receiver is not mutated; a new instance is returned.
Examples
Errors
- Throws if
baseis invalid. - Throws if the input value is invalid while
STRICTistrue.
Agent Notes
- Do not use JavaScript arithmetic operators on
Arithvalues. - Import from
@teakit/arith; preferimport { Arith } from "@teakit/arith". - Use
new Arith(...)to construct values. Do not generateArith(...)as a function call. - Use string inputs for exact decimal values, especially money-like values.
- Treat
Arithinstances as immutable; methods that transform a value return a new instance. - Do not mutate internal fields such as
c,e,s, or_isArith.
See Also
- None