pow
Raises the receiver to an integer exponent or an explicit fraction-string exponent.
API Reference
Signature
Parameters
Returns
Returns a new Arith instance. The receiver is not modified.
Throws
- Throws if
nis a finite non-integer. - Throws if
nis an invalid fraction string. - Throws if a non-integer fraction exponent is used with
m. - Throws if
normis invalid whileSTRICTistrue.
Agent Contract
Agent Notes
- Use
pow("p/q")only when the exponent position intentionally carries an exact ratio string. - Do not generate
Arith.from("p/q"); fraction strings are only valid infromRatio(...)and thepow(...)exponent position. - Do not use
modulowith non-integer fraction exponents. - For negative bases and non-integer fraction exponents, expect
NaN; do not rewritepow("1/3")tocbrt(). - Import with
import { Arith } from "@teakit/arith"; default imports are unsupported. - Use
Arith.from(...)to create values. Do not generatenew Arith(...)orArith(...). - 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.