Numlex Documentation
Syntax Reference

Money & rates

Currency markers, ISO annotation, named money values, time rates, and the strict phrase rules that never guess.

Main branch reference after R89 · released versions may differ docs/SYNTAX_REFERENCE.md @ 1ebc752

Money in Numlex is a first-class kind of quantity: lines that contain a currency marker or an ISO annotation must parse completely as a money expression, and $10 + €5 is a visible error rather than a guess.

This page lists every marker, the ISO and named-alias options, named money values, the arithmetic that follows the general operators, time-rate expressions such as $24 per day and $85 / hr, and the exact neutral-word and time-word sets that surround amounts.

Currency markers

Markers are matched from one table, longest first — so CN¥ is never eaten by the trailing ¥:

CA$ NZ$ HK$ MX$ NT$ A$ S$ R$ CN¥ Rp RM zł Kč $ € £ ¥ ₽ ₩ ₹ ₺ ₴ ₫ ₱ ฿ ₪ ₦ ₾ ₸ ₮ ₯ ៛ ₡ ₲ ₵
  • Position: either prefix ($45, Rp25000, zł100) or postfix (45$, 2.5K$, 100zł).
  • Doubled or malformed markers are not markers, and a marker glued to a unit (km$5) is not a marker.
  • A bare $ means USD; a bare ¥ means JPY (China is written unambiguously as CN¥).
  • Instead of a marker you can annotate the number with an ISO code: 100 USD.

The full ISO list lives in the Currency reference.

Writing amounts

Amounts accept the usual numeric conveniences: grouping ($3,400), decimals ($2.50) and compact suffixes ($3k — see Numbers & integer bases).

One currency per line. $10 + €5 is a hidden error, not a conversion.

Named money values

Money values can be named like any other value:

lunch = $45
2 people × lunch      → 90$

The name follows the general rules — 1–6 ASCII words (or one word), at most 40 characters. Because the value carries its currency, the later multiplication stays money.

Arithmetic and contextual percents

Inside money lines, the same general operators apply: + − × ÷ of ( ). The additive percent context works with money too:

$100 + 10%           → 110$

Time rates

Writing per <time> or / <time> opens a rate:

$24 per day
$85 / hr

A numeric time (30 days, 8 hrs) is a duration, and multiplying a duration by a rate cancels the dimension:

$24 per day × 12 hrs  → 12$

Time coefficients are exact catalog values (based on seconds). An un-cancelled rate is a hidden error — never a plain number. A sentence-final period is accepted (8 hrs.), while a decimal point is not stripped.

Neutral words

Only the following neutral words are intentionally accepted around amounts. Any other word makes the line invalid — unknown money phrases are never guessed:

was is lunch dinner breakfast earnings income salary people person tip tips
tax taxes sales total bill order cost price item items each spent paid got
for the food material materials

Time words

These words set a rate or a duration, with exact catalog coefficients:

s sec secs second seconds min mins minute minutes h hr hrs hour hours
d day days w wk wks week weeks

Verified examples

lunch was $45 + $60     → 105$
tip for 2 people 18%    → 18%
$24 per day × 12 hrs    → 12$
$85 / hr × 2 hrs        → 170$
2 people × lunch        → 90$   (after lunch = $45)
sales tax 8% of $120    → 9.6$

Found an issue in these docs? Report it on GitHub .