suppose I have a finite set of real numbers ${r_1, \ldots r_n \in \mathbf{R} }$ and a single real number $x \in \mathbf{R}$. Is there a fast algorithm for finding integer numbers ${i_1, \ldots i_n \in \mathbf{Z}}$ such that
$ \left| i_1 r_1 + \ldots + i_n r_n - x \right| < \epsilon $
For a given $\epsilon > 0$ ? I know that $i_1 r_1 + \ldots + i_n r_n = 0$ iff $i_j = 0 \,\forall j$.