Floor Function/Examples/Floor of -1.1

Theorem

$\floor {-1 \cdotp 1} = -2$

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


Proof

We have that:

$-2 \le -1 \cdotp 1 < -1$

Hence $-2$ is the floor of $-1 \cdotp 1$ by definition.

$\blacksquare$


Also see


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: Exercise $1$