  We establish uniform error bounds of an exponential wave integrator Fourier
pseudospectral (EWI-FP) method for the long-time dynamics of the nonlinear
Klein-Gordon equation (NKGE) with a cubic nonlinearity whose strength is
characterized by $\varepsilon^2$ with $\varepsilon \in (0, 1]$ a dimensionless
parameter. When $0 < \varepsilon \ll 1$, the problem is equivalent to the
long-time dynamics of the NKGE with small initial data (and $O(1)$ cubic
nonlinearity), while the amplitude of the initial data (and the solution) is at
$O(\varepsilon)$. For the long-time dynamics of the NKGE up to the time at
$O(1/\varepsilon^{2})$, the resolution and error bounds of the classical
numerical methods depend significantly on the small parameter $\varepsilon$,
which causes severe numerical burdens as $\varepsilon \to 0^+$. The EWI-FP
method is fully explicit, symmetric in time and has many superior properties in
solving wave equations. By adapting the energy method combined with the method
of mathematical induction, we rigorously carry out the uniform error bounds of
the EWI-FP discretization at $O(h^{m_0} + \varepsilon^{2-\beta}\tau^2)$ up to
the time at $O(1/\varepsilon^{\beta})$ with $0 \leq \beta \leq 2$, mesh size
$h$, time step $\tau$ and $m_0$ an integer depending on the regularity of the
solution. By a rescaling in time, our results are straightforwardly extended to
the error bounds and $\varepsilon$-scalability (or meshing strategy
requirement) of the EWI-FP method for an oscillatory NKGE, whose solution
propagates waves with wavelength at $O(1)$ and $O(\varepsilon^{\beta})$ in
space and time, respectively, and wave speed at $O(\varepsilon^{-\beta})$.
Finally, extensive numerical results are reported to confirm our error
estimates.
