Simple units
Area and volume units also accept the typographic forms
m² and m³. Time units can also be squared (s^2, hr^2, …); squared time is the time² denominator that appears in acceleration units such as m/s^2.
Most units also accept their full names, singular or plural, including common spelling variants — ft can be written foot or feet, and m as meter, meters, metre, or metres.
Unit suffixes are case-sensitive: USD is not usd, and Gbit is not gbit or GBIT. Use the exact casing shown above.
Compound units
A compound unit combines a unit from one dimension with a unit from another. Any simple unit from each constituent dimension can be paired, so velocity coversm/s, km/hr, ft/min, and every other length-over-time combination, not only the named shorthands. TrueMath also recognizes a few shorthand suffixes for common pairings.
Cost and per-unit-count compounds are written directly from their constituent units, for example
USD/hr, USD/ft^2, or ct/m^2.
Conversion behavior
- Compatible units convert automatically.
1m + 10cmproduces a length; you never convert by hand. - The result takes the first unit in the expression.
5in + 10ftis125in, and5hr + 6minis5.1hr— the leading unit sets the result and the rest convert into it. - Multiplication and division derive dimensions. A length over a time is a velocity; a currency over an area is a cost-per-area.
- Incompatible units are rejected.
5m + 3kgis an error rather than a wrong number. See Combining types.
Casting to a specific unit
To choose the unit a result is reported in, append a target unit to a parenthesized expression:Angles are interpreted by the unit you attach:
sin(45deg) and sin((pi/4)rad) are equivalent. See Trigonometry.
