These functions all operate on numerical expressions only, and will return an error if used on any other values.
See also Section 11.1.1, “Mathematical operators”.
ABS returns the absolute value of a number.
Syntax: ABS( expression )
Arguments:
Query.
START a=node(3), c=node(2) RETURN a.age, c.age, abs(a.age - c.age)
The absolute value of the age difference is returned.
ROUND returns the numerical expression, rounded to the nearest integer.
Syntax: ROUND( expression )
Arguments:
Query.
START a=node(1) RETURN round(3.141592)
SQRT returns the square root of a number.
Syntax: SQRT( expression )
Arguments:
Query.
START a=node(1) RETURN sqrt(256)
Copyright © 2013 Neo Technology