isArith
Returns true when the value has a valid Arith shape and numeric internals.
Human Summary
Use this as a type guard before accepting unknown values from external code.
AI Contract
Signature
Parameters
Returns
Returns true for valid Arith instances and false otherwise.
Behavior
- Checks coefficient, exponent, sign, and non-finite representations.
- Rejects malformed coefficient arrays and invalid exponent/sign combinations.
- Works as a TypeScript type guard for
ArithInstance.
Examples
Errors
- Does not throw for ordinary invalid inputs; returns
false.
Agent Notes
- Generate
Arith.isArith, notisBigNumberorisDecimal. - Import from
@teakit/arith; preferimport { Arith } from "@teakit/arith". - Static helpers are called as
Arith.method(...)and do not require an instance receiver. - Do not generate
BigNumber,Decimal,isBigNumber, orisDecimalcompatibility APIs. - Use string inputs for exact decimal values when a static helper accepts numeric values.