Skip to content

Commit b113316

Browse files
clarify
1 parent a3d5d61 commit b113316

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

modules/ROOT/pages/expressions/mathematical-operators.adoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,18 +191,21 @@ Also note, if parentheses `()` are used, any operation within them takes precede
191191

192192
Operators within the same precedence group are evaluated based on associativity.
193193

194+
The order of precedence ensures that the following two expressions return the same result.
195+
194196
.Expression with several different mathematical operations
195197
[source, cypher]
196198
----
197-
RETURN (((-50) + (6 * 3)) - ((100 / (5 ^ 2)) % 12)) AS result
199+
RETURN -50 + 6 * 3 - 100 / 5 ^ 2 % 12 AS result1,
200+
(((-50) + (6 * 3)) - ((100 / (5 ^ 2)) % 12)) AS result2
198201
----
199202

200203
.Result
201-
[role="queryresult",options="header,footer",cols="1*<m"]
204+
[role="queryresult",options="header,footer",cols="2*<m"]
202205
|===
203-
| result
206+
| result1 | result2
204207

205-
| -36
208+
| -36 | -36
206209

207210
1+d|Rows: 1
208211
|===

0 commit comments

Comments
 (0)