@numbers
Arithmetic checks over numbers in the text: percentages, sums, intervals.
Mission control: These systems are still on the test stand. Fly them, log everything.
Under review: works today, may fold into expressions or a vocabulary before 1.0.
Quick reference
| Written as | Fails with | Applies to |
|---|---|---|
@numbers/ | percent-mismatch warn | document |
@numbers/ | sum-mismatch warn | document |
@numbers/ | interval-mismatch warn | document |
Examples
@numbers/ percent
Recompute self-contained n/ percentages: warn when p ≠ round(100·n/N) at the displayed precision. Skips when N=0 or a part is unparseable. Warns only.
<!-- mdv: document @numbers/percent -->
37/120 (42.1%) of participants reported nausea.@numbers/ sums
Within one scope (a line/item), parse label: value parts plus a declared total and warn when the parts do not sum to the total. Skips when there is no total, <2 parts, or an unparseable value. Warns only.
<!-- mdv: document @numbers/sums -->
train: 8000, validation: 1000, test: 500 (total: 10000)@numbers/ interval
Every x (95% CI a–b) interval in prose or a table cell must contain its point estimate and be ordered (a ≤ x ≤ b). Skips mixed-unit or one-sided intervals; never fires inside code fences. Warns only.
<!-- mdv: document @numbers/interval -->
The hazard ratio was 0.82 (95% CI 0.71–0.95).