In mathematical analysis, the Weierstrass approximation theorem states that every continuous function defined on a closed interval can be uniformly approximated as closely as desired by a polynomial function. Because polynomials are among the simplest functions, and because computers can directly evaluate polynomials, this theorem has both practical and theoretical relevance, especially in polynomial interpolation. The original version of this result was established by Karl Weierstrass in 1885 using the Weierstrass transform. Marshall H. Stone considerably generalized the theorem and simplified the proof . His result is known as the Stone–Weierstrass theorem. The Stone–Weierstrass theorem generalizes the Weierstrass approximation theorem in two directions: instead of the real interval , an arbitrary compact Hausdorff space is considered, and instead of the algebra of polynomial functions, a variety of other families of continuous functions on are shown to suffice, as is detailed below. The Stone–Weierstrass theorem is a vital result in the study of the algebra of continuous functions on a compact Hausdorff space. Further, there is a generalization of the Stone–Weierstrass theorem to noncompact Tychonoff spaces, namely, any continuous function on a Tychonoff space is approximated uniformly on compact sets by algebras of the type appearing in the Stone–Weierstrass theorem and described below. A different generalization of Weierstrass' original theorem is Mergelyan's theorem, which generalizes it to functions defined on certain subsets of the complex plane. Weierstrass approximation theorem The statement of the approximation theorem as originally discovered by Weierstrass is as follows: A constructive proof of this theorem using Bernstein polynomials is outlined on that page. Applications As a consequence of the Weierstrass approximation theorem, one can show that the space is separable: the polynomial functions are dense, and each polynomial function can be uniformly approximated by one with rational coefficients; there are only countably many polynomials with rational coefficients. Since is metrizable and separable it follows that has cardinality at most . (Remark: This cardinality result also follows from the fact that a continuous function on the reals is uniquely determined by its restriction to the rationals.) Stone–Weierstrass theorem, real version The set of continuous real-valued functions on , together with the supremum norm , is a Banach algebra, (that is, an associative algebra and a Banach space such that for all ). The set of all polynomial functions forms a subalgebra of (that is, a vector subspace of that is closed under multiplication of functions), and the content