I'm pretty sure that the answer will depend on what interval you are considering. I say this because most of the approximation theorems I am aware of (that would be useful in this case) rely on you working on some closed interval .
Well the Stone-Weirestrass theorem states that this is possible. However, in most proofs I have seen you never actually see how to construct such polynomials.
Though not all hope is lost. Look at Bernstein Polynomials. Here is a link to the Wikipedia page on them. Also a while back I wrote a blog entry on just this topic, here is a link to the post. I don't think that I mentioned this in the post say using the method described in the post you end up with a polynomial of degree , there might be other polynomials of lower degree that also give you the desired error. This is because of some very conservative estimations that are made.
The function to be round up in the interval is and it is an even function, so that we search an even polinomial of degree written as that approximates in 'min-max' sense. If we indicate the 'error function' with , the 'min-max condition' force that to be...
, (1)
The (1) is a system of linear equations in the unknown variables that can be solved in standard way. In the case it becomes...
(2)
... the solution of which is , so that the 'min-max' polynomial is and the error is alternatively and . You require an error not grater than , so that the min-max polynomial is of order , i.e. and (1) becomes...
(3)
... the solution of which is left as exercise ...
Kind regards
The 'solution' of the 'exercise' I have proposed in the last post is , so that the min-max polynomial of degree 4 gives an approximation with maximum error ...
If greater precision is required it is necessary to increase and the maximum error I suppose is ...
Kind regards