Ceiling Function/Examples/Ceiling of -1.1
Jump to navigation
Jump to search
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
- Floor of $1 \cdotp 1$: $\floor {1 \cdotp 1} = 1$
- Floor of $-1 \cdotp 1$: $\floor {-1 \cdotp 1} = -2$
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$