Description:
The formula parser does not recognise % as a unary postfix operator. In Excel and Google Sheets, =4% evaluates to 0.04 (the operator divides the operand by 100, and has higher precedence than the binary arithmetic operators). Wafflebase currently treats % as either an unknown token or a binary operator, so common idioms like =A1 * 5% or =B2 + 10% cannot be expressed.
What you expected to happen:
=4% parses and evaluates to 0.04.
=4% * 3 parses and evaluates to 0.12 (because % binds tighter than *).
=5% + 10% evaluates to 0.15.
=A1 * 5% works for any numeric A1.
=4%3 raises a syntax error — 4% is a complete expression, and 3 cannot follow without a binary operator. This matches Google Sheets.
How to reproduce it (as minimally and precisely as possible):
Setup: A1=200.
| Cell |
Formula |
Expected |
Actual |
Status |
| B1 |
=4% |
0.04 |
#ERROR! |
✗ |
| B2 |
=4% * 3 |
0.12 |
#ERROR! |
✗ |
| B3 |
=5% + 10% |
0.15 |
#ERROR! |
✗ |
| B4 |
=A1 * 5% |
10 |
#ERROR! |
✗ |
| B5 |
=4%3 |
#ERROR! |
#ERROR! |
✓ (should also error — but for the right reason) |
Description:
The formula parser does not recognise
%as a unary postfix operator. In Excel and Google Sheets,=4%evaluates to0.04(the operator divides the operand by 100, and has higher precedence than the binary arithmetic operators). Wafflebase currently treats%as either an unknown token or a binary operator, so common idioms like=A1 * 5%or=B2 + 10%cannot be expressed.What you expected to happen:
=4%parses and evaluates to0.04.=4% * 3parses and evaluates to0.12(because%binds tighter than*).=5% + 10%evaluates to0.15.=A1 * 5%works for any numericA1.=4%3raises a syntax error —4%is a complete expression, and3cannot follow without a binary operator. This matches Google Sheets.How to reproduce it (as minimally and precisely as possible):
Setup: A1=
200.=4%0.04#ERROR!=4% * 30.12#ERROR!=5% + 10%0.15#ERROR!=A1 * 5%10#ERROR!=4%3#ERROR!#ERROR!