returns the largest integer not exceeding 1. It is called the floor function, and it is easiest to picture as the first integer you meet looking to the left from along the number line.
The domain is all real numbers. The value returned is always an integer, so the range is the set of all integers, a discrete collection rather than a continuous line. Only integer heights are ever taken.
The graph is a staircase. Each step is a horizontal segment of length , and the value jumps up by at every integer.
| Interval | Value |
|---|---|
Each step includes its left end and excludes its right end. On the value is always , and the moment reaches it jumps to .
The function is discontinuous at every integer. Approaching an integer from the right the limit is , while from the left it is , and the two disagree. The size of the jump is always .
At non-integer points the value is constant nearby, so the function is differentiable there with derivative . It is made of nothing but flat steps of slope and sudden jumps.
The value never decreases as increases, so the function is non-decreasing. It is not strictly increasing, however, since the value stays put along each step.
Note that , not . The floor function does not discard the fractional part; it always rounds toward . That differs from the integer division of many programming languages, which rounds toward , so negative numbers deserve care.
The number of digits of a positive integer is found with the floor function.
The quotient of an integer division , the computation of array indices and the paging of a list all use it: wherever a continuous quantity has to be cut into steps.