I was thinking about:

$$\left\lfloor\frac{a}{b}\right\rfloor - \left\lfloor\frac{c}{d}\right\rfloor = \frac{a}{b} - \left\{\frac{a}{b}\right\} - \frac{c}{d} + \left\{\frac{c}{d}\right\}$$

It occurred to me that:

$$-1 <\left\{\frac{c}{d}\right\} - \left\{\frac{a}{b}\right\} < 1$$

So that:

$$\left\{\frac{c}{d}\right\} -\left\{\frac{a}{b}\right\} = \left\{\frac{c}{d} - \frac{a}{b}\right\}$$

But if that's the case, then:

$$\left\lfloor\frac{a}{b}\right\rfloor - \left\lfloor\frac{c}{d}\right\rfloor = \left(\frac{a}{b}-\frac{c}{d}\right) - \left\{\frac{a}{b} - \frac{c}{d}\right\} = \left\lfloor\frac{a}{b} - \frac{c}{d}\right\rfloor$$

If my reasoning was valid, I expected to find this property in the wikipedia article on ceiling functions.

I found this:

$$\left\lfloor{x}\right\rfloor + \left\lfloor{y}\right\rfloor \le \left\lfloor{x+y}\right\rfloor$$

Is there a mistake in the reasoning? If my reasoning is valid, I would have expected the wikipedia article to include:

$$\left\lfloor{x}\right\rfloor - \left\lfloor{y}\right\rfloor = \left\lfloor{x-y}\right\rfloor$$

Apologies if this is a duplicate question. I went through all the similar questions and could not find it. I did a search on floor functions on this site but it returned too many questions to go through all of them.

  • 1
    $\begingroup$ $\lfloor 1\rfloor - \lfloor 0.5 \rfloor \neq \lfloor 1 - 0.5 \rfloor$. $\endgroup$ – Alex Provost Apr 22 '17 at 17:15
  • $\begingroup$ Awesome. I suspected my reasoning was invalid. $\endgroup$ – Larry Freeman Apr 22 '17 at 17:20

Your equality relating fractional parts isn't true. For instance, $\{ 1 - 0.5\} = 0.5$ but $\{1\} - \{0.5\} = -0.5$.

  • $\begingroup$ Thanks very much for the explanation! Now, I am clear. $\endgroup$ – Larry Freeman Apr 22 '17 at 17:26

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.