The Complete Numi Syntax Reference
Numi accepts standard arithmetic operators, worded equivalents like plus and times, percentage forms with the percent symbol, assignment with an equals sign, conversion with the keyword in, and a compact function library covering rounding, roots, and basic trigonometry. Everything below is organized by category, with the exact forms that parse and the near-misses that don’t. Tested against Numi 3.31.
Key takeaways
- Worded operators map onto symbolic ones with identical precedence, so “plus” and “+” behave the same and neither overrides multiplication.
- Percentages are contextual: adding a percentage applies it to the left-hand value rather than adding a raw number.
- The conversion keyword is
in, withtoandasworking interchangeably in most positions. - Variables resolve after units and currencies, so any name that doubles as a measurement abbreviation loses.
- The function library is intentionally narrow, and statistical or matrix work belongs in a different tool entirely.
Arithmetic operators
| Operator | Worded form | Example | Notes |
|---|---|---|---|
+ |
plus, and | 120 + 45 |
Also concatenates compatible units |
- |
minus, less | 500 - 120 |
Doubles as a negative sign and a date separator |
* |
times, multiplied by | 6 * 85 |
x between numbers also works in most contexts |
/ |
divided by, over | 340 / 4 |
Also forms compound units, as in km/h |
^ |
to the power of | 2 ^ 10 |
** is accepted in some builds |
% |
mod | 17 mod 5 |
Modulo only where no percentage reading fits |
( ) |
— | (120 + 45) * 3 |
The only reliable way to override precedence |
Precedence follows standard mathematics regardless of whether you type symbols or words. 10 plus 5 times 2 returns 20, not 30, because “times” binds tighter than “plus” exactly as * binds tighter than +. Worded input reads left to right to a human and doesn’t to the parser, which is the single most common source of a result that looks wrong. Parentheses settle it every time.
Percentages
Percentages are the highest-traffic feature in the app and the one with the most context-dependent behavior. Four forms cover essentially everything.
| Form | Example | Returns | Reading |
|---|---|---|---|
| Percent of | 15% of 82 |
12.3 | Plain percentage of a value |
| Additive | 200 + 15% |
230 | Applies the percentage to the left value |
| Subtractive | 84.99 - 30% |
59.49 | Discount off the left value |
| Multiplicative | 240 * 15% |
36 | Same as percent of, written symbolically |
The additive row is the one that surprises people arriving from a basic calculator. 200 + 15% does not add the number 15 or the number 0.15. It reads the percentage against the left operand and returns 230, which is almost always what someone typing that line meant. It’s also why tax and tip lines read so cleanly: 68.40 + 18% is the whole calculation.
Chained percentages compound in sequence rather than summing. 100 + 10% + 10% returns 121, not 120, because the second percentage applies to 110. That’s mathematically correct and occasionally not what someone intended, particularly for stacked discounts, so it’s worth writing out explicitly when the distinction matters.
Assignment and references
| Keyword | Example | What it does |
|---|---|---|
= |
rate = 85 |
Stores a value under a name for later lines |
sum |
sum |
Totals the contiguous block of result lines above |
total |
total |
Equivalent to sum in most positions |
prev |
prev * 1.2 |
Refers to the result of the line directly above |
Assignment accepts any evaluable expression on the right side, including one referencing earlier variables, and the stored value carries its unit. distance = 5 km stores a length, not the number five, so every downstream line inherits unit checking.
Naming matters more than it should. Variables resolve last in the parser’s lookup order, after keywords, currencies, units, and date words, so in, m, s, h, and three-letter currency codes like try and cad all lose to their dictionary meanings. Four characters minimum, never a measurement word, and a silent blank line is usually a collision rather than a bug in Numi.
Units and conversion
The conversion keyword is in. The words to and as work identically in most positions, so pick whichever reads better.
12 km in miles
2 cups to grams
340 eur as usd
distance in feet
18 gb / 40 mbps in minutes
The last line is unit algebra rather than simple conversion. Gigabits divided by gigabits-per-second cancels to seconds, which then converts to minutes. This works because compound units like mbps resolve to a composite of a data unit and a time unit, and the evaluator checks compatibility at each node. When units don’t cancel to something compatible with the requested output, the line returns nothing rather than a meaningless figure.
Unit names accept multiple spellings that all canonicalize to one internal unit. km, kilometer, kilometers, and kilometres are the same thing to the parser. Ambiguous short forms are the exception worth avoiding: write min and sec rather than m and s, since m can read as meters, minutes, or million depending on neighbors.
Currency specifics
Currency codes and symbols both parse. $50, 50 usd, and 50 dollars all resolve. Symbol placement binds to the adjacent number, so $50 and 50 $ work while doubled symbols don’t.
Rates are fetched rather than frozen, which means a saved document’s converted totals recompute on reopening. For a forward-looking budget that’s correct behavior. For a record of what something cost on a given date, store the converted result as a plain number instead. Anyone using a natural language calculator for Mac for invoicing should also check the rate’s last refresh before a figure goes anywhere official.
Dates and durations
| Pattern | Example | Returns |
|---|---|---|
| Date difference | days between mar 1 and jul 4 |
A day count |
| Date offset | today + 45 days |
A future date |
| Duration addition | 3 hours + 45 min |
A normalized duration |
| Duration conversion | 2.5 hours in minutes |
A converted duration |
| Rate against duration | 85/hour * 6.5 hours |
A plain value, hours cancel |
Duration math is where mixed abbreviations cause the most trouble. 5 m + 30 s may resolve m as meters and fail on incompatible units, while 5 min + 30 sec is unambiguous. The extra two characters are worth typing every time.
Business-day arithmetic, holiday calendars, and timezone-aware date math are outside what this format handles. Those belong in a calendar tool or a spreadsheet with a proper date library.
Functions
| Function | Example | Purpose |
|---|---|---|
round |
round(12.487) |
Nearest whole value, with optional precision argument |
ceil / floor |
ceil(4.2) |
Round up or down unconditionally |
sqrt |
sqrt(144) |
Square root |
abs |
abs(-40) |
Absolute value |
min / max |
max(120, 340, 85) |
Smallest or largest of the arguments |
log / ln |
log(1000) |
Logarithms, base ten and natural |
sin / cos / tan |
sin(45) |
Trigonometry, check the angle mode first |
Arguments sit inside parentheses, separated by commas where a function takes several. That comma is an argument delimiter rather than a thousands separator, which the tokenizer distinguishes by context. Writing max(1,200, 340) is genuinely ambiguous and worth avoiding by dropping the thousands comma entirely. This is one of the few places where a text calculator for Mac asks you to write less naturally than you’d speak.
Number formats and constants
- Thousands separators are tolerated inside numbers:
4,200reads as four thousand two hundred. - Scientific notation works in the usual form, as in
1.2e6. - Hexadecimal and binary parse with standard prefixes, and base conversion follows the same
inkeyword pattern. - Constants including pi and e resolve by name, which is another reason not to use single letters as variable names.
- Negative values work as expected, though wrapping them in parentheses inside a larger expression removes any ambiguity with subtraction.
What doesn’t parse
The honest half of a syntax reference. These forms return nothing, tested on 3.31:
- Numbers spelled as words.
twenty percent of eightyneeds digits. - Conditional logic. There’s no if-then construct, so threshold-dependent values must be split into separate labeled lines.
- Solving for unknowns.
solve x + 15 = 40is symbolic algebra and outside scope. Numi evaluates fixed expressions. - User-defined functions. You can’t define a reusable operation and call it with different arguments.
- Referent tracking across clauses.
add 15% then subtract 10% of the originalrequires knowing what “the original” points at, and the parser has no such memory. - Statistical and matrix work. Distributions, regressions, and matrix operations aren’t in the library and aren’t intended to be.
The failure mode throughout is silence rather than an error message, which is the app’s least helpful behavior. A blank line means the parser found nothing it could execute, and it won’t tell you which token defeated it. Rewording a clause into shorter lines usually isolates the problem faster than staring at the original, and splitting one long sentence into two named steps in Numi app fixes a surprising share of them.
Five habits that prevent most syntax problems
- Use digits, never spelled-out numbers.
- Name variables with four or more characters that aren’t unit or currency abbreviations.
- Add parentheses whenever a line mixes worded and symbolic operators.
- Spell out ambiguous units:
minoverm,secovers. - Split long clauses into two lines joined by a named variable, which parses more reliably and reads better later.
Those five eliminated nearly every parsing problem across a week of daily use with Numi mac. What remained were capability gaps rather than phrasing issues, and no amount of rewording adds a feature that isn’t there.
Frequently asked questions
What operators does Numi support?
Standard arithmetic operators for addition, subtraction, multiplication, division, exponentiation, and modulo, plus parentheses for grouping. Several have worded equivalents such as plus, minus, times, and divided by, mapping onto the same operations with the same precedence.
How do you write a percentage in Numi?
Attach the percent symbol directly to a number. Adding or subtracting a percentage applies it to the value on the left, so 200 plus 15% returns 230 rather than 215. The phrase “percent of” also works, and decimals remain valid where clearer.
What keyword converts units in Numi?
The keyword is in, placed between a value and a target unit or currency code. to and as work the same way in most contexts. Conversion applies to units and currencies alike, and works on variables as well as literal numbers.
Does Numi support functions like round and sqrt?
Yes, including rounding, square root, absolute value, minimum, maximum, logarithms, and basic trigonometry, with arguments in parentheses. The library is narrower than a scientific calculator and doesn’t cover statistical distributions or matrix operations.
How do you add a comment or label in Numi?
A line containing no evaluable expression is treated as a label and displays without a result, which is how headings work. Text preceding a calculation on the same line is generally tolerated as long as the numeric expression stays recognizable.
