I am trying to isolate a variable that is inside a floor function, and this floor function is inside a ceiling function.
Here is the equation: $$\Large{F = \left\lceil{256 * D_1\over\left\lfloor\left\lfloor{256 * D_2\over\left\lfloor{256 * D_0\over\left\lfloor(100 + W - S) * \frac{A}{100}\right\rfloor}\right\rfloor}\right\rfloor * \frac{E}{100}\right\rfloor}\right\rceil - O}$$
I am solving for variable $E$. This is being used with JavaScript, so while every other variable is considered a constant, the constants change in the runtime, so I need to be able to calculate $E$ in the runtime, rather than just manually calculate it on paper and then plug it in.
As a example, where $D_1=13, D_2=9, D_0=19, A=256, W=0, S=-30$ and $E=130$, then $F=15$. But at runtime, I know $F$ but do not know $E$, and so I wish to calculate it. I do not need to know the range of values it could be, only the smallest integer within that range.
Assumptions that are safe to make: all variable constants are integers. Of course, intermediate calculations will result in decimal numbers (floats) until a floor or ceiling is reached. $F$ will always be an integer. $E$ will always be an integer. Where there could be several integers $E$ that could obtain one $F$, the answer is always the smallest of the integer $E$s. Where there could be several integers $F$ to obtain one $E$, the answer is always the smallest of the integer $F$s. Additionally, $15 <= E <= 175$ in all regards and $F>=2$ in practice. I can look up the correct values for both $E$ and $F$ at any given time manually to confirm whether or not it is correct, but it is impractical to use this information in the coding environment.
I've spent about a week off and on looking at this, testing various things in code, writing it out on paper and seeing if I can get anywhere, and I'm fairly stumped. I've asked friends who are particularly good at math for help and they're getting stumped as well, so I figure I would try StackOverflow. I'm beginning to wonder if this is even possible.
Among the "guesstimations" I've done with coding, the closest result I observed to the correct answers was simply moving $O$ to the other side of the equation, then swapping the positions of $F + O$ and $E$ in the equation. It is still off the mark by a notable margin though.
For more information, a less complex equation has been solved in the way that I am asking which, as far as I've seen so far, is correct in practice. Maybe it is useful in solving the more complex equation. For clarification, these two formulas below are mutually exclusive to the given formula above, and cannot be used to solve the original formula in the literal sense. It may be that these formulas are completely useless in determining the answer for the more complex formula. I provided them as a "this is how we solved a different equation with similar constants", but they do not directly help solve the given equation above.
The original equation was: $$F=\Biggl\lceil\frac{256 * D_0}{\lfloor A * \frac{E}{100}\rfloor}\Biggr\rceil - O$$
The equation solved for $E$ that has been correct so far: $$E=\Biggl\lceil\biggl\lceil\frac{256 * D_0}{F + O}\biggr\rceil * \frac{100}{A}\Biggr\rceil$$