Floor is between Number and One Less

Theorem

$x - 1 < \floor x \le x$

where $\floor x$ denotes the floor of $x$.


Proof

By definition of floor function:

$\floor x \le x < \floor x + 1$

Thus by subtracting $1$:

$x - 1 < \paren {\floor x + 1} - 1 = \floor x$

So:

$\floor x \le x$

and:

$x - 1 < \floor x$

as required.

$\blacksquare$


Sources

  • 1997: Donald E. Knuth: The Art of Computer Programming: Volume 1: Fundamental Algorithms (3rd ed.) ... (previous) ... (next): $\S 1.2.4$: Integer Functions and Elementary Number Theory