pow
Alias for exponentiatedBy.
Human Summary
Use it as a compact alias when code already makes the exponentiation intent obvious.
AI Contract
Signature
Parameters
Returns
Returns a new Arith instance. The receiver is not modified.
Behavior
- Same behavior as
exponentiatedBy. - The exponent must be an integer, except
NaNand infinities follow non-finite behavior. - Negative exponents are rounded according to
DECIMAL_PLACESandROUNDING_MODE.
Examples
Errors
- Throws if
nis a finite non-integer. - Throws if
normis invalid whileSTRICTistrue.
Agent Notes
- Prefer
exponentiatedBywhen clarity matters more than brevity. - 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.