ceiling()

Calculates the smallest integer greater than, or equal to, the specified numeric expression.

Syntax

ceiling(x)

Arguments

  • x: A real number.

Returns

  • The smallest integer greater than, or equal to, the specified numeric expression.

Examples

print c1 = ceiling(-1.1), c2 = ceiling(0), c3 = ceiling(0.9)
c1 c2 c3
-1 0 1