Ceiling Function/Examples/Ceiling of -1.1

Theorem

$\ceiling {-1 \cdotp 1} = -1$

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


Proof

We have that:

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

Hence $-1$ is the ceiling 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$