This directory contains both user-facing guides and internal engineering snapshots.
For installation, quick-start examples, and the main public API entrypoints,
read the repository README.md.
| Goal | Recommended doc |
|---|---|
| Learn package usage quickly | ../README.md |
| Use free functions for common operations | This file (Free Functions section) |
| Understand simplification behavior snapshots | SIMPLIFY.md, SIMPLIFICATIONS.md |
| Review playground sample outcomes | PLAYGROUND.md |
| Review internal architecture boundaries | architecture/README.md |
Top-level free functions for common operations — no ComputeEngine setup required:
parse(latex)— parse a LaTeX string into anExpressionsimplify(latex | expr)— simplify a LaTeX string or expressionevaluate(latex | expr)— evaluate a LaTeX string or expressionN(latex | expr)— compute a numeric approximationexpand(latex | expr)— expand products and powers (distributive law)expandAll(latex | expr)— recursively expand all sub-expressionsfactor(latex | expr)— factor an expression as a productsolve(latex | expr, vars)— solve an equation or system for the given variablescompile(latex | expr, options?)— compile an expression to JavaScript (or another target)assign(id, value)/assign({...})— assign values in the shared engine
These use a shared ComputeEngine instance created on first call.
Use getDefaultEngine() to configure it (precision, angular unit, etc.).
Runtime contract checks are enforced for extension points:
registerCompilationTarget(name, target)validates target name format and requiredLanguageTargetmethods (getOperators(),getFunctions(),createTarget(),compile()).new ComputeEngine({ libraries: [...] })validates custom library shape (name,requires,definitions,latexDictionary).compile(expr, options)validates extension-facing payload shape (to,target,operators,functions,vars,imports,preamble,fallback).
These files are useful implementation snapshots, but they are not a canonical API reference: