How to represent the ceiling function using mathematical notation?
I need an equation to input in a program because it doesn't except the ceiling function so it has to be some sort of mathematical equation. I also can't convert decimal numbers to integers within the string.
I know the floor function can be represented mathematically most simply as "x-x mod 1" or using an arctan equation but is there something similar to these mathematical formats for the ceiling function?
Thanks!!
$\endgroup$2 Answers
$\begingroup$Note that $\lceil x\rceil = -\lfloor -x\rfloor$.
$\endgroup$ 2 $\begingroup$I've tried my hand at writing one; I'd be interested to hear what you think. Assume $x\in\mathbb{R}$.
$$\lfloor x \rfloor:=\sup\{n\,\big\vert\,n\in\mathbb{Z}\quad n\leq x\}$$
$$\lceil x \rceil:=\inf\{n\,\big\vert\,n\in\mathbb{Z}\quad n\geq x\}$$
$\endgroup$ 2