shiftedBy
Returns this * 10^n.
Human Summary
Use it for decimal scale changes such as cents-to-dollars or percentage basis-point shifts.
AI Contract
Signature
Parameters
Returns
Returns a new Arith instance.
Behavior
- Positive
nmoves the decimal point right. - Negative
nmoves the decimal point left. - Equivalent to multiplying by
1e${n}withAritharithmetic.
Examples
Errors
- Throws if
nis not an integer in the safe supported range.
Agent Notes
- Prefer
shiftedByover manual string decimal-point manipulation. - 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.