7
$\begingroup$

Given:

  • $\operatorname{Floor}(x)=\lfloor x \rfloor$
  • $\operatorname{Ceiling}(x)=\lceil x \rceil$

Where $x$ is a real number.

Is there any other (mathematical) way for defining $\operatorname{Floor}(x)$ and $\operatorname{Ceiling}(x)$?

Restrictions:

  • Do not use the $\operatorname{Floor}$ function in order to define the $\operatorname{Ceiling}$ function.
  • Do not use the $\operatorname{Ceiling}$ function in order to define the $\operatorname{Floor}$ function.
  • Do not use the $\operatorname{Round}$ function in order to define either one of them.

Please excuse the possible duplicate, as I haven't been able to do find this question anywhere...

$\endgroup$
0

3 Answers 3

8
$\begingroup$

Floor and ceiling functions are usually defined as

$$ \lfloor x \rfloor=\max\, \{m\in\mathbb{Z}\mid m\le x\} $$ and $$ \lceil x \rceil=\min\,\{n\in\mathbb{Z}\mid n\ge x\} $$ for $x\in\mathbb R$ (see Floor and ceiling functions for more details).

$\endgroup$
7
$\begingroup$

Use $\bmod$ (not necessarily $\diamond$ mods) $$ \lfloor x \rfloor = x - \bmod(x,1) $$ To get $\bmod(x,1)$, use $\frac12\Biggr(\frac{\log\left(\exp\left(2\pi i(x- \frac12)\right)\right)}{\pi i}+1\Biggr)$, since $\exp\left(2\pi i(x- \frac12)\right)$ has a period of $1$.

$\endgroup$
0
0
$\begingroup$

$\lfloor x \rfloor = \max\{n \in \mathbb Z: n \le x\}$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .