toExponential
Returns a string in exponential notation.
Human Summary
Use it when output should always be exponential, regardless of EXPONENTIAL_AT.
AI Contract
Signature
Parameters
Returns
Returns a string.
Behavior
- Always uses exponential notation for finite values.
- When
decimalPlacesis supplied, rounds to that many places after the decimal point. - Uses current
ROUNDING_MODEwhenroundingModeis omitted.
Examples
Errors
- Throws if
decimalPlacesorroundingModeis invalid.
Agent Notes
- 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.