How to represent the ceiling function using mathematical notation?

13.9k Views Asked by At

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!!

2

There are 2 best solutions below

2
On

Note that $\lceil x\rceil = -\lfloor -x\rfloor$.

2
On

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\}$$