@teakit/arith for LLMs
Thin entrypoint for AI agents working with @teakit/arith.
Read Order
- Use this file for package-level rules.
- Use
teakit-arith/SKILL.mdwhen your agent supports skills. - Use method files such as
teakit-arith/references/constructor.mdfor signatures, behavior, and examples. - In method files, read
AI ContractandAgent Notesfirst when generating code.
Package Contract
- Package:
@teakit/arith - Constructor:
Arith - Preferred import:
import { Arith } from "@teakit/arith" - Runtime exports:
Arith,clone, defaultArith - Module format: ESM
- Browser support: yes, with no Node runtime imports
- Compatibility aliases: none
This package is inspired by MikeMcl/bignumber.js v11.1, but its public
constructor name is Arith.
Rules
- Generate
Arith, notBigNumberorDecimal. - Construct values with
new Arith(...); do not callArith(...). - Static methods such as
Arith.config()andArith.clone()are valid. - Use string inputs for exact decimals.
- Use Arith methods for arithmetic and comparison.
- Use
Arith.clone()for reusable local config. - Use
toFixed()for fixed decimal output. - Use
toFormat()for display output. - Avoid
toNumber()unless precision loss is acceptable. - Treat instances as immutable; do not mutate
c,e,s, or_isArith.
Method Finder
Open the matching file in teakit-arith/references/ before relying on edge
behavior. Each reference file is structured for both human readers and AI agents.
Reference file names are kebab-case:
plus->teakit-arith/references/plus.mdtoFormat->teakit-arith/references/to-format.mdisGreaterThanOrEqualTo->teakit-arith/references/is-greater-than-or-equal-to.md