Read these guides and the generated API reference on the documentation site.
Start with the package overview or the public entry-point reference. The root export is the curve API; expressions, numeric helpers and adapters have their own entries.
For sibling packages, begin with adapter contracts, then choose only the optional rational capabilities the algorithm needs. Reuse configured backends through the expression and curve factories; use the public validation boundaries for external data. Unit interpretation, caching and application policies remain with the caller.
| Area | Source |
|---|---|
| Mathematical lexer, Pratt grammar and immutable AST | src/expressions/lexer.ts, src/expressions/parser.ts, src/expressions/types.ts |
| Reusable Pratt engine, token cursor and source spans | Published @neutrium/utilities/parsing |
| Expression compiler, evaluator and function registry | src/expressions/engine.ts, src/expressions/functions.ts |
| Adapter interfaces and optional capabilities | src/adapters/contracts/ |
| Adapter configuration detection | src/adapters/configuration.ts |
| Adapter conformance checks and example | src/adapters/testing.ts, examples/boxed-integer-adapter.ts |
| Number, BigInt and Decimal backends | src/adapters/ |
| Exact integer conversion | src/numeric/integer.ts |
| Cross-adapter scalar conversion | src/numeric/conversion.ts |
| Factors and rational arithmetic | src/numeric/factors.ts, src/numeric/rational.ts |
| Fractions, roots and rational powers | src/numeric/fractions.ts, src/numeric/roots.ts, src/numeric/powers.ts |
| Curve factory and compiled instances | src/curves/engine.ts |
| Shared curve arithmetic context | src/curves/context.ts |
| Equations, interpolation and piecewise curves | src/curves/equations.ts, src/curves/interpolation.ts, src/curves/piecewise.ts |
| Model fitting and QR solver | src/curves/fitting.ts, src/curves/least-squares.ts |
| Curve definitions and input validation | src/curves/definition-types.ts, src/curves/validation.ts |
| Feature tests | Each feature's tests/ directory |
| Installed-package checks | scripts/test-package.mjs, scripts/adapter-consumer.ts |
Run npm test for the build, consumer type checks, feature tests and package checks. Run npm run benchmark for performance measurements. Public consumers should use package entry points; source paths above are for navigating the implementation.