8
$\begingroup$

Given:

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

Where $x$ is a real number.

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

Restrictions:

  • Do not use the Floor function in order to define the Ceiling function.
  • Do not use the Ceiling function in order to define the Floor function.
  • Do not use the 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...

Thanks

$\endgroup$

3 Answers 3

8
$\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$
14
  • $\begingroup$ And how do you define $mod$? $\endgroup$ Apr 2, 2014 at 15:29
  • $\begingroup$ @barakmanos what about $\log(\exp(i2\pi x)/(i2\pi))$? $\endgroup$
    – draks ...
    Apr 2, 2014 at 15:38
  • $\begingroup$ I don't know. Can you please elaborate on this in your answer? It actually looks very interesting, though I'd like to be sure that it gives the correct answer (and whether it is $Floor$ or $Ceiling$). Thanks $\endgroup$ Apr 2, 2014 at 15:45
  • $\begingroup$ So the result is a complex number... Do I take the $Real$ part then? $\endgroup$ Apr 2, 2014 at 15:55
  • 1
    $\begingroup$ Here is the graph: wolframalpha.com/share/… $\endgroup$ Apr 3, 2014 at 9:32
7
$\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$
0
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.