Scaling a set of reals to be nearly integers A version of this question was previously asked on MSE. I'll mention progress below.
A geometric construction I'm exploring
leads to a set $R$ of $n$ positive real numbers, for example:
$$
R = \{ \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$ so that, for each $x \in R$, $s x$ is within $\epsilon$ of a natural number (i.e., excluding $0$).
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 $R$:
$$
7.018 \, R \approx \{22.048, 19.077, 9.925\} \;,
$$
and the gaps to the nearest integers are
$$
\{0.048, 0.077, 0.075 \} \;,
$$
each less than $\epsilon$.
But I don't know that $7.018$ is the minimum.

Q. What is a general procedure to compute the smallest $s$, given $R$ and $\epsilon$? Ideally I would like an algorithm.

Two algorithms were proposed at MSE, both somewhat brute-force searches.
One searches through all
the integers to which the scaled reals might round.
The other searches
through rational approximations to pairwise ratios of the reals.
In my circumstance, $|R|$ might be $10$ or $20$, or even larger.
For fixed $R$, how the minimum $s$ varies with $\epsilon$ is of interest
to me, so I understand the tradeoffs between $s$ and $\epsilon$.
A comment at MSE suggests the relationship between $s$ and $\epsilon$
could behave "a bit wildly."
 A: Let $R = \{x_1,\dots,x_n\}$. An integer relation between $x_j$ and $-1$ is a pair $(a_j,a_{j*}) \in \mathbb{Z}^2$ satisfying $a_j x_j = a_{j*}$. Suppose there are such integer relations for all $j \in [n]$ and let $a_0 := \text{lcm}_j a_j$ and $b_j := a_0/a_j$: then $(a_0,a_{j*}b_j)$ is also such an integer relation. In particular, $a_0 x_j = a_{j*} b_j \in \mathbb{Z}$ for all $j \in [n]$. 
Now of course $a_0$ is not a priori the same as your desired $s$. However, PSLQ will produce integer relations of minimal norm in the relevant case of dimension 2 (see, e.g., p.2 of "Analysis of PSLQ, an integer relation finding algorithm'') and I would guess (hope?) that you can turn this into an optimal construction by building your $\epsilon$ into $R$ via suitable rational approximations.
A: Even though you asked for the optimal solution and others have already answered in this regard, I think it's still worth mentioning the following efficient approach to getting "good" solutions which may not be optimal:
Let me first mention a different but related problem: given $(\xi_1,\ldots,\xi_r) \in \mathbb{R}^r$ (all irrational, say), how can we simultaneously approximate the $\xi_i$ by rationals $p_i/q$ having the same denominator $q$?  I.e., how can we scale $(\xi_1,\ldots,\xi_r)$ by a $q\in\mathbb{N}_{>0}$ so that $|q\xi_i - p_i|$ are small without $q$ being too large?
Dirichlet tells us that there exist $q$ arbitrarily large so that $|q\xi_i - p_i| \leq q^{-1/r}$ where $p_i = \lceil q\xi_i \rfloor$ ("closest integer to"); it doesn't help us find them, unfortunately.  But here's how we can obtain a not-quite-so-good approximation in an algorithmically convenient way: for $A>0$ real, consider the image of the $\mathbb{Z}$-linear map $\mathbb{Z}^{r+1} \to \mathbb{R}^{r+1}$ taking $(p_1,\ldots,p_r,q)$ to $(A(q\xi_1-p_1),\ldots,A(q\xi_r-p_r),q/A^r)$.  This is a lattice in $\mathbb{R}^{r+1}$, which I just described through a matrix, and we are trying to find short nonzero vectors in it: using the LLL algorithm we can find something like $|q\xi_i - p_i| \leq 2^{r/2}/A$ with $q\leq 2^{r/2} A^r$.
As for your original problem, if we are given $(\xi_0,\ldots,\xi_r)$, you can first scale by $\xi_0^{-1}$, say putting $\xi'_i = \xi_i/\xi_0$ so that $\xi'_0 = 1$, forget about this one and apply what I just said to $(\xi'_1,\ldots,\xi'_r)$: this gives you a scale factor $s := q/\xi_0$ such that $s\xi_i \approx p_i$ is close to an integer and $s\xi_0 = q$ is an integer.
Given that the problem of finding the shortest nonzero vector in a lattice is hard (in various practical or conjectural ways), I suspect your problem is algorithmically hard if you insist on getting the optimal solution and if $r$ (your $n-1$) is large.  But I thought the LLL algorithm deserved at least a mention.
A: Since you want algorithm:  One approach is to formulate it
as mixed integer program and try to solve it with some solver.
For $\pi,e, \sqrt{p}, p < 20$ I got $X=1696.29259$.
For the original problem, got $X=7.014499269$
Here is sagemath code, you can try in a browser on their cloud.
def tesscalerat1():

    """

    """

    p = MixedIntegerLinearProgram(maximization = False)
    cons=[RR(pi),RR(exp(1)),RR(2).sqrt()] #set of constants
    bi=p.new_variable(integer=True)
    vi=p.new_variable(integer=False)
    X=vi['x']
    eps=0.08
    p.add_constraint(X,min=0.1) #XXX
    for i in xrange(len(cons)):
        T=cons[i]
        xi=bi['x%s'%i]
        p.add_constraint(X*T-xi,min= -eps,max=eps)

    p.set_objective(X)
    obj=p.solve()
    print 'X=',obj

