How do the floor and ceiling functions work on negative numbers? It's clear to me how these functions work on positive real numbers: you round up or down accordingly. But if you have to round a negative real number: to take $\,-0.8\,$ to $\,-1,\,$ then do you take the floor of $\,-0.8,\,$ or the ceiling?
That is, which of the following are true?
$$\lfloor-0.8\rfloor=-1$$
$$\text{or}$$
$$\lceil-0.8\rceil=-1$$

Keep in mind that $\lfloor x \rfloor \le x \le \lceil x \rceil$, so it's the first one.
More precisely, for $x \in \Bbb{R}$,
$$
\lfloor x \rfloor = \max \{ z \in \Bbb{Z} : z \le x \}
$$
while
$$
\lceil x \rceil = \min \{ z \in \Bbb{Z} : x \le z \}.
$$
