I have a set $P$ of $n$ positive real numbers, for example: $$ P = \{ \pi, e, \sqrt{2} \} \approx \{3.14159, 2.71828, 1.41421\} \;. $$ Given some $\epsilon > 0$, I would like to find the smallest scale factor $s \ge 1$ so that, for each $x \in P$, $s x$ is within $\epsilon$ of an integer. More precisely, if $[z]$ is $z$ rounded to the nearest integer, then $| sx - [sx] | < \epsilon$. For example, if $\epsilon = 0.08$, then $s=7.018$ works for the above $P$:
$$ 7.018 \, P \approx \{22.0477, 19.0769, 9.92495\} \;, $$ and the gaps to the nearest integers are $$ \{0.0477, 0.0769, 0.0750\} \;. $$ But I don't know that $7.018$ is the minimum.
Q. What is a general procedure to compute the smallest $s$, given $P$ and $\epsilon$?
There's a simple approach: search through all possible integer values for them to round to.
It may be 'inelegant', but it is simple, easy to implement, and may already meet your needs.
To elaborate on how this might work, we could proceed as follows:
and so forth.