is called the ceiling function, and it returns the smallest integer that is at least 1. The symbol suggests a ceiling, and the function is the counterpart of the floor function .
An integer is returned unchanged, and anything else is rounded up to the next integer. For negative numbers the rounding goes toward , that is to the right along the number line.
The domain is all real numbers and the range is the set of all integers. The graph is a staircase of horizontal segments at integer heights.
| Interval | Value |
|---|---|
Each step has width and includes its right end, the integer point, while excluding its left end. Which end is included is exactly the reverse of the floor function.
The function is discontinuous at every integer. At an integer the limit from the left is and the value is too, so it is continuous from the left; but the moment passes the value leaps to . The jump is always of size .
The ceiling function is left-continuous, in contrast to the floor function, which is right-continuous.
The two are related by a reversal of sign.
Moreover when is not an integer, and the two agree when it is. Given the floor function, the ceiling function follows at once.
The number of boxes needed to pack items at a time is found by rounding up.
Packing items five to a box, for instance, takes boxes.
Rounding up is always the right choice in such settings, so that the last, partly filled unit is not overlooked.