numbers and the grouping law
Arithmetic
Vision spells arithmetic in words and requires explicit grouping when operations mix. No silent precedence surprises.
Operators
Vision's five arithmetic operators, written in words:
the total is the price plus the tax the change is the paid minus the total the area is the width times the height the average is the sum divided by the count the volume is the side to the power of 3
plus · minus · times ·
divided by · to the power of
The grouping law
When you mix two different arithmetic operations on a single line, Vision requires you to use parentheses to make the order explicit. The compiler refuses to proceed until you do.
// These won't compile — Vision requires you to group mixed operations: a plus b times c x minus y divided by z // Correct: the grouping is on the page a plus (b times c) x minus (y divided by z)
This applies to any mixture of operations: plus with
times, minus with divided by, and so
on. Chaining the same operation (a plus b plus c) is fine — no
grouping needed.
Math functions
Common math operations use plain English phrases. No import required.
the root is the square root of 9.0 the limit is keep score between 0 and 100 the rounded is the whole part of 3.7 // gives 3 the bigger is the larger of a, b the smallest is the smallest of x, y, z
Available:
the square root of xthe tangent of xthe hyperbolic tangent of xthe larger of a, bthe smaller of a, bthe largest of a, b, c, …the smallest of a, b, c, …keep x between low and high— clamps x to the rangethe whole part of x— rounds down to a whole number
Why grouping matters
In C and most of its descendants, a + b * c silently means
a + (b * c) because * has higher precedence than
+. The rule is in the spec, not on the page. A reader who forgets
it — or who comes from a language with different rules — sees a value that is
quietly wrong.
Vision refuses to compile ambiguous expressions. The order is always written down, always visible, always exactly what it appears to be. A wrong calculation cannot hide behind a precedence rule nobody remembered.