  The universal approximation theorem is generalised to uniform convergence on
the (noncompact) input space $\mathbb R^n$. All continuous functions that
vanish at infinity can be uniformly approximated by neural networks with one
hidden layer, for all continuous activation functions $\varphi\neq0$ with
asymptotically linear behaviour at $\pm\infty$. When $\varphi$ is moreover
bounded, we exactly determine which functions can be uniformly approximated by
neural networks, with the following unexpected results. Let
$\overline{\mathcal{N}_\varphi^l(\mathbb R^n)}$ denote the vector space of
functions that are uniformly approximable by neural networks with $l$ hidden
layers and $n$ inputs. For all $n$ and all $l\geq2$,
$\overline{\mathcal{N}_\varphi^l(\mathbb R^n)}$ turns out to be an algebra
under the pointwise product. If the left limit of $\varphi$ differs from its
right limit (for instance, when $\varphi$ is sigmoidal) the algebra
$\overline{\mathcal{N}_\varphi^l(\mathbb R^n)}$ ($l\geq2$) is independent of
$\varphi$ and $l$, and equals the closed span of products of sigmoids composed
with one-dimensional projections. If the left limit of $\varphi$ equals its
right limit, $\overline{\mathcal{N}_\varphi^l(\mathbb R^n)}$ ($l\geq1$) equals
the (real part of the) commutative resolvent algebra, a C*-algebra which is
used in mathematical approaches to quantum theory. In the latter case, the
algebra is independent of $l\geq1$, whereas in the former case
$\overline{\mathcal{N}_\varphi^2(\mathbb R^n)}$ is strictly bigger than
$\overline{\mathcal{N}_\varphi^1(\mathbb R^n)}$.
