Closed matthijsr closed 1 year ago
For clarity:
6 - 2 * 3 + 4 / 2 - 1 + 2
\=
6 - (2 * 3) + (4 / 2) - 1 + 2
\=
3
While
6 - ( 2 * ( 3 + ( 4 / ( ( 2 - 1 ) + 2 ) ) ) )
\=
-8/3
What's interesting is that the order of operations of equivalent operations is respected (i.e., it's folded left), which suggests there's probably a mistake in the parser configuration w.r.t. how combinations of non-equal operations are folded.
6 - 2 * 3 + 4 / 2 - 1 + 2
Gets interpreted as...
6 - ( 2 * ( 3 + ( 4 / ( ( 2 - 1 ) + 2 ) ) ) )
(Albeit without explicit parentheses)... by the parser.
Fix this in the parser, or the query system, or both.
The order of operations is: