Some motivation:
I have a (simplified) function $f(x) = \frac{k}x$, where $k$ is some real constant and $x$ is a real number. The result of the function, however, is always truncated to an integer for application purposes. Since I also use the inverse of this function and the inverse is a floating-point result, I want to know the maximum error caused by the conversion. This means I am looking for the largest value of ($x_2$-$x_1$) that will satisfy $f(x_1) - f(x_2) < 1$.
So the starting equation is this:
$k\cdot\left(\frac{1}{x_1}-\frac{1}{x_2}\right)<1$
which I can rewrite as
$k\cdot\left(\frac{x_2-x_1}{x_1\cdot x_2}\right)<1$
and now I (sort of conveniently) have
$(x_2-x_1)<\frac{x_1\cdot x_2}k$
My problem: I don't know what $x_1$ and $x_2$ are, nor do I care. I just know they are fairly close to each other, e.g., $x_2 - x_1 \ll 1$
Can someone point me in the right direction to my desired solution? Or perhaps my approach is totally wrong?