Skip to main content

Module tower

Module tower 

Source
Expand description

The number tower router. Every value carries a TowerLevel; operations try to stay at the lowest (cheapest) level they can, dropping down when a result simplifies (e.g. √2·√2 = 2) and rising only when forced.

When a caller asks for digits, the request flows down the tower: a symbolic expression is simplified, then (if still not exact) elevated to a computable real that produces the requested precision.

Enums§

TowerLevel
The levels of the number tower, ordered cheapest-first.
TowerValue
A value somewhere in the number tower.

Functions§

is_perfect_square
Square-free check helper exposed for completeness (used by examples/tests).