# How do I correctly deal with equations involving floor (or ceiling) functions?

In the actual case, I have an equation stated by

$$\left\lfloor \frac{64GB}{r} - 4 \right\rfloor = k$$

where $$64 GB = 64 \cdot 2^{30}$$, and $$k > 0$$.

I need to solve for $$r$$. Now, I know how to deal with this when no floor function is involved. However, when attempting to consider the floor function where it makes sense, I feel that this is, well, garbage.

$$\left\lfloor {64 GB \over r} \right\rfloor = k + 4$$

$$\frac 1r = \frac{k+4}{64GB} \qquad \text{(This is not true, it's not equal.)}$$

$$r = \left\lfloor {64 GB \over (k + 4)} \right\rfloor$$

Before applying the floor function, I end up with an integer, plus a fraction $$> 0.5$$, which is uncomfortably large. Granted the previous step shows just a small difference, but there is no equality. When multiplying with a large value (as $$64 GB$$ is), the inequality is multiplied accordingly.

How are such equations approached correctly?

• what is /, and the weird brackets you're using...? Why not using latex? Also consider changing the title that is quite misleading. Apr 16 '20 at 13:11
• Have a look at mathjax to typeset your equation. Apr 16 '20 at 13:48

Considering your equation as, where $$k\in\Bbb Z$$ $$\left\lfloor\frac{64\text{GB}}{r}\right\rfloor=k+4$$ We need the interior of the floor function to be between $$k+4$$ and $$k+5$$. We will replace the floor function by inequalities. $$k+4\leq\frac{64\text{GB}}{r} Then solve both inequalities. $$k+4\leq\frac{64\text{GB}}{r}\implies r\leq\frac{64\text{GB}}{k+4}$$ $$\frac{64\text{GB}}{r}\frac{64\text{GB}}{k+5}$$ Combining those inequalities $$r\in\left]\frac{64\text{GB}}{k+5},\frac{64\text{GB}}{k+4}\right]$$ Remark: Without context, I suppose $$k+4$$ and $$k+5$$ to be positive. If they are negative, one has to be careful with the inequalities. It nay change the answer.