Cypher Ceil Function

ceil() returns the smallest floating point number that is greater than or equal to the given number and equal to a mathematical integer.

Syntax: ceil(expression)

Returns: A Float.

Arguments

NameDescription
expressionA numeric expression.

Example

RETURN ceil(1.3)

The value returned will be the smallest floating point number greater than 1.3 that will be greater or equal to 1.3 and will be an integer. Hence the value returned would be 2.0

Considerations

  • ceil(null) returns null.

Example

RETURN ceil(-1.7)

Returns the following Result

ceil(-1.7)
-1.0

Example

RETURN ceil(5)

Returns the following Result

ceil(5)
5.0

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

Example

RETURN ceil(null)

Returns the following Result

ceil(null)
null

Noteceil(null) returns null.

Learn More