Skip to main content

Module symbolic

Module symbolic 

Source
Expand description

Level 4 — 𝒮. Symbolic expression trees and an identity graph.

The point of this level is that most computations involving π, e, √2, … never need decimal digits — they need algebraic relationships. simplify(sin(π)) returns Integer(0) by a table lookup, in O(1), rather than evaluating sin(3.14159…) ≈ 1.2e-16 the way floating point does.

Structs§

IdentityGraph
Holds the rewrite rules. For v0.1 the rules are encoded directly in IdentityGraph::simplify; the type exists so the API can grow into a real rule database later.

Enums§

SymbolicExpr
A symbolic numeric expression.
TowerLevel
Tower classification of a symbolic expression.

Functions§

tower_level
Classify an expression by the lowest tower level that can hold it.