Cypher Floor Function

floor() returns the largest floating point number that is less than or equal to the given number and equal to a mathematical integer.

Syntax: floor(expression)

Returns: A Float.

Arguments

NameDescription
expressionA numeric expression.

Example

RETURN floor(1.3)

The value returned will be the largest floating point number smaller than 1.3 that will be lesser or equal to 1.3 and will be an integer. Hence the value returned would be 1.0

Considerations

  • floor(null) returns null.

Example

RETURN floor(-1.7)

Returns the following Result

floor(-1.7)
-2.0

Example

RETURN floor(5)

Returns the following Result

floor(5)
5.0

Note– The value returned by the floor() function is always a float and never an integer.

Example

RETURN floor(null)

Returns the following Result

floor(null)
null

Notefloor(null) returns null.

Learn More