Literals
- Numbers —
42,3.14,-7.2. Scientific notation usese:1.5e-3is0.0015. - Numbers with units — a unit literal wrapped in backticks (see Units in equations).
- Tables — bracketed lists:
[1; 2; 3]. See Tables.
Units in equations
A unit used as a literal must be wrapped in backticks, so it reads as a unit and not a variable name. Both simple and compound units work:m, yr, or USD is parsed as a variable name. See Unit numbers.
This applies only inside equations. In structured-text input a value is not an expression, so units are written plainly — 30 yr, no backticks.
Variables
A variable name starts with a letter and contains letters, digits, and underscores:rate, home_price, term. Variable names are case insensitive and will be lowercased automatically. In an equation, a variable refers to one of the domain’s variables.
Constants
Operators
Arithmetic+ - * / ^, comparison == != < > <= >=, and logical && || !. Group with
parentheses to control evaluation order:
Functions
Call a function by name with arguments separated by semicolons:sqrt, SQRT, and Sqrt are equivalent). See the
Function library.
Assignment
= binds the result of an expression to a variable:
= with ==: = assigns a value to a variable, while == tests whether two values are equal inside a condition. They are not interchangeable. See Operators and precedence.
The argument separator and the table/row separator are both the semicolon (
;). Commas are not used in equations.Combining types
Equations operate on three value types: scalar numbers, unit numbers, and tables. When an operation combines values, TrueMath applies consistent rules — and rejects combinations that are not meaningful.Numbers
- Scalar with scalar → scalar.
- Compatible units → converted to a common unit and combined.
- Incompatible units → rejected, because the dimensions differ.
- Multiplication and division combine dimensions — a length multiplied by a length is an area; a length divided by a time yields a velocity; a currency divided by an volume yields a cost-per-volume. See Units.
Tables
- Table with scalar → the scalar is applied to every cell.
[1; 2; 3] * 2is[2; 4; 6]. - Table with table → element-wise, and the tables must have the same shape.
[1; 2] + [3; 4]is[4; 6]. - Mismatched shapes → rejected.

