# How to isolate a variable in a floor function?

I hope someone may be able to help me solve the following equation for $y$?

$$x=\frac b{50}\left\lfloor{50ay\over b}\right\rfloor$$

I'm trying to isolate $y$ so I can program an Excel file to solve the problem when $a$, $b$, and $x$ are known values. Is there a way to express the formula in a way that can be relied upon with utilizing the "goal seeker" feature on each dataset. I have nearly $3000$ of these.

• Do you allow $a,b,x,y$ to be non-integers? Are they all positive numbers? – Crostul Mar 4 '16 at 22:34
• Is it $$\frac{1}{50 b \operatorname{floor}(50ay/b)}$$ or $$\frac{1}{50} b \operatorname{floor}(50ay/b)$$ or what else? Please, write your formula unambiguously (use brakets). – Crostul Mar 4 '16 at 22:39
• x and y may be negative. a and b will always be positive and they may be non-integers except for b. – apeters Mar 4 '16 at 22:40
• It's the second example in the comment: (1/50)*b*floor(50ay/b) – apeters Mar 4 '16 at 22:44
• I disagree with @Crostul as your notation was perfectly unambiguous, however I have edited your question to introduce $\LaTeX$ formatting which is used on this site via MathJax. Please follow this link to a basic introductory tutorial and familiarize yourself with $\LaTeX$ to provide better quality questions next time. Good luck! – dbanet Mar 4 '16 at 22:50

The equation $$x=\frac{1}{50} b \operatorname{floor}(50ay/b)$$ is equivalent to $$\frac{50x}{b} = \operatorname{floor}\left( \frac{50ay}{b} \right)$$ so, if $\frac{50x}{b}$ is not an integer, we have to stop, since the equation is impossible (no value of $y$ will satisfy that equation).
In the case that this is an integer, we can go on: the last equation is equivalent to $$\frac{50x}{b} \le \frac{50ay}{b} < \frac{50x}{b} +1$$ since $\frac{50a}{b} > 0$, we can divide everything by $\frac{50a}{b}$ getting $$\frac{x}{a} \le y < \frac{x}{a} + \frac{b}{50a}$$ So every number in the interval $\left[ \frac{x}{a} , \frac{x}{a}+ \frac{b}{50a} \right)$ may be a correct value for $y$.
• Where "it is impossible to solve for $y$" should be read as "there is no solutions since $\lfloor\cdot\rfloor$ always returns an integer". – dbanet Mar 4 '16 at 22:52
• The solution is not unique! I hope that this does not give you some troubles. Moreover, notice that in the case when $50x/b$ is not an integer, the equation is impossible. – Crostul Mar 4 '16 at 22:52
• My point is, "impossible to solve" is ill-defined, while "no solutions exist" or equivalently "the solution set is empty" has meaning. Additionally, I do not quite follow where did $50a/b>0$ come from. – dbanet Mar 4 '16 at 22:54