1
$\begingroup$

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?

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

1 Answer 1

2
$\begingroup$

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}<k+5$$ 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}<k+5\implies 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.

$\endgroup$
3
  • $\begingroup$ How do you decide which of the two last values is the correct one? $\endgroup$ Apr 16, 2020 at 13:38
  • $\begingroup$ @N3buchadnezzar Your answer will be a range of values, not a single one. Any value in the given range will work. $\endgroup$ Apr 16, 2020 at 13:45
  • $\begingroup$ That makes a ton of sense, thanks! $\endgroup$ Apr 16, 2020 at 13:45

You must log in to answer this question.

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