diff --git a/modules/ROOT/content-nav.adoc b/modules/ROOT/content-nav.adoc index 1a27ec07d..66de0ff85 100644 --- a/modules/ROOT/content-nav.adoc +++ b/modules/ROOT/content-nav.adoc @@ -72,6 +72,7 @@ *** xref:expressions/predicates/string-operators.adoc[] *** xref:expressions/predicates/path-pattern-expressions.adoc[] *** xref:expressions/predicates/type-predicate-expressions.adoc[] +** xref:expressions/mathematical-operators.adoc[] ** xref:expressions/conditional-expressions.adoc[] * xref:functions/index.adoc[] diff --git a/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc b/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc index 7ecb42f80..fc2c528fd 100644 --- a/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc +++ b/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc @@ -185,7 +185,7 @@ For example, `RETURN sum()` on an empty table returns `NULL` in GQL, but i | 20.21 | -| xref:syntax/operators.adoc#query-operators-mathematical[Mathematical operators] +| xref:expressions/mathematical-operators.adoc[Mathematical operators] | | 20.22 diff --git a/modules/ROOT/pages/expressions/index.adoc b/modules/ROOT/pages/expressions/index.adoc index 1b1812a3a..49bb55a52 100644 --- a/modules/ROOT/pages/expressions/index.adoc +++ b/modules/ROOT/pages/expressions/index.adoc @@ -11,4 +11,5 @@ For details and examples of specific expressions, see the following sections: ** xref:expressions/predicates/string-operators.adoc[]: `STARTS WITH`, `ENDS WITH`, `CONTAINS`, `IS NORMALIZED`, `IS NOT NORMALIZED`, `=~` ** xref:expressions/predicates/path-pattern-expressions.adoc[]: information about filtering queries with path pattern expressions. ** xref:expressions/predicates/type-predicate-expressions.adoc[]: information about how to verify the value type of a Cypher expression. +* xref:expressions/mathematical-operators.adoc[]: `+`, `-`, `*`, `/`, `%`, `^`. * xref:expressions/conditional-expressions.adoc[] diff --git a/modules/ROOT/pages/expressions/mathematical-operators.adoc b/modules/ROOT/pages/expressions/mathematical-operators.adoc new file mode 100644 index 000000000..d40f68a92 --- /dev/null +++ b/modules/ROOT/pages/expressions/mathematical-operators.adoc @@ -0,0 +1,257 @@ += Mathematical operators +:description: Information about Cypher's mathematical operators. +:table-caption!: + +Cypher contains the following mathematical operators: + +* Addition or unary addition: `+` +* Subtraction or unary minus: `-` +* Multiplication: `*` +* Division: `/` +* Modulo division: `%` +* Exponentiation: `^` + +For additional mathematical expressions, see: + +* xref:functions/mathematical-logarithmic.adoc[Logarithmic functions] +* xref:functions/mathematical-numeric.adoc[Numeric functions] +* xref:functions/mathematical-trigonometric.adoc[Trigonometric functions] + +[[examples]] +== Examples + +.Addition operator (`+`) +[source, cypher] +---- +RETURN 10 + 5 AS result +---- + +.Result +[role="queryresult",options="header,footer",cols="1*