Stuck solving an equation using the floor operator.

313 Views Asked by At

I am not entirely familiar with the equation ninja'ing involving the floor operators. Here is my problem. I need to solve for $x$. Everything is an integer, including $x$:

$$ a - 1 = \lfloor {\frac{x - b}{b - c} \rfloor} $$

The wiki has a nice page on the floor operator, but I am new at equations involving floor manipulations, so I am not really sure how to go about isolating $x$ at this point, thereby solving for it. Thanks.

EDIT: This is not a homework problem. I am writing software that needs to solve this for a seismological problem.

1

There are 1 best solutions below

2
On

Hint: $a - 1 = \lfloor {\frac{x - b}{b - c} \rfloor}$ if and only if $a - 1\le \frac{x - b}{b - c}<a $. So you have to solve this system of inequalities.