Precedence
From tightest to loosest. Attaching a unit to a number binds tighter than
any operator, so 10 m / 2 s divides two quantities.
| Level | Operators |
|---|---|
| 20 | ^, prefix -, not |
| 16 | a number and its unit |
| 14 | %, !, two quantities side by side (5 ft 11 inch) |
| 13 | *, /, mod, of, per, times, at, nearest |
| 12 | +, -, to, as, plus, minus |
| 10 | in |
| 8 | ==, !=, <, <=, >, >=, before, after, ago, hence |
| 6 | and |
| 4 | or |
to sits with + and -, so a to USD + b to USD does not do what it
looks like. Parenthesise each conversion, or convert the sum:
(a + b) to USD.