<s>[INST] Range of error in truncated division $\lfloor\frac{a\pm 1}{b\pm 1}\rfloor$ With $a,b\in\mathbb{N}^+$, $b > 1$ and $2\lfloor\log_2(b+\Delta_b)\rfloor\ge\lfloor\log_2(a+\Delta_a)\rfloor$ where $\Delta_n\in\{-1,0,1\}$ is my guess that
$$x + \Delta_x = \left\lfloor\frac{a+\Delta_a}{b+\Delta_b}\right\rfloor$$
correct? If the difference would be restricted to the numerator it would be
$$\left\lfloor \frac{a - 1}{b} \right\rfloor = \left\lfloor \frac{a}{b} + \frac{b - 1}{b} \right\rfloor -1$$
and
$$\left\lfloor \frac{a + 1}{b} \right\rfloor = \left\lfloor \frac{a}{b} + \frac{1}{b} \right\rfloor$$
respectively if I remember it right but the denominator is involved, too. So, how do I (dis)prove my assumption?
Edited for clarity:
$\Delta_n$ is meant to be a variable, so with all possible variations of the division the outcome is one of $x + 0$, $x - 1$, or $x + 1$ where $x + 0$ is the outcome of $\lfloor (a + 0 / (b + 0) \rfloor$. My assumption is that for all of the variations
$\lfloor(a+1)/(b+1)\rfloor$,
$\lfloor(a+1)/(b+0)\rfloor$,
$\lfloor(a+1)/(b-1)\rfloor$,
$\lfloor(a+0)/(b+1)\rfloor$,
$\lfloor(a+0)/(b-1)\rfloor$,
$\lfloor(a-1)/(b+1)\rfloor$,
$\lfloor(a-1)/(b+0)\rfloor$,
$\lfloor(a-1)/(b-1)\rfloor$, the result $x'$ is at most one unit away from  $x = \lfloor (a + 0 / (b + 0) \rfloor$
 [/INST] The largest and smallest numbers that can be expressed as $\frac{a+\Delta_1}{b+\Delta_2}$ with $\Delta_1,\Delta_2\in\{-1,0,1\}$ are $\frac{a+1}{b-1}$ and $\frac{a-1}{b+1}$, respectively. We can calculate that
$$\frac{a+1}{b-1}-\frac{a}{b}=\frac{a+b}{b(b-1)}$$
and
$$\frac{a}{b}-\frac{a-1}{b+1}=\frac{a+b}{b(b+1)}.$$
If these differences are both at most $1$, that is, if $a\leq b^2-2b$, then the floors of any of these and $\frac{a}{b}$ can't differ by more than $1$; if $\lfloor y\rfloor\geq\lfloor x\rfloor+2$, then
$$y\geq \lfloor y\rfloor\geq \lfloor x\rfloor+2>x+1.$$
In general, it's a bad idea to use the same letter to refer to different variables (even if they vary among the same set); I've used $\Delta_1$ and $\Delta_2$ to clarify what's happening here.
</s>