Skip to main content

Module simplify

Module simplify 

Source

Functions§

simplify
Full simplification (spec §8.3 levels 2/3): fold recursively, then apply rules on demand — Pow(sqrt(x), 2) → x, Euler’s e^{iθ} → cos + i·sin, constant folding for sin/cos/exp/log/ln/abs/sqrt, Pow(x, 1/2) → \sqrt{x}. Simplification never changes the mathematical value.
simplify_at
Simplification gated by a level (spec §8.3/§13.2): a lower simplify_level reduces how many rules are applied, while intern-time level-0/1 canonicalization (0*x→0, 1*x→x, constant merging) always holds. Level >= 2 enables the symbolic rules (builtin constant folding, sqrt-elimination, Euler’s formula); level 3 is a superset for future rationalization rules.