The Wallis product for , as seen on Wikipedia, is

Historical significance of this formula nonwithstanding, one has to admit that this is not a good way to approximate . For example, the product up to is

And all we get for this effort is the lousy approximation .

But it turns out that (1) can be dramatically improved with a little tweak. First, let us rewrite partial products in (1) in terms of double factorials. This can be done in two ways: either

or

Seeing how badly (2) underestimates , it is natural to bump it up: replace with :

Now with we get instead of . The error is down by **two orders of magnitude**, and all we had to do was to replace the factor of with . In particular, the size of numerator and denominator hardly changed:

Approximation (4) differs from (2) by additional term , which decreases to zero. Therefore, it is not obvious whether the sequence is increasing. To prove that it is, observe that the ratio is

which is greater than 1 because

Sweet cancellation here. Incidentally, it shows that if we used instead of , the sequence would overshoot and no longer be increasing.

The formula (3) can be similarly improved. The fraction is secretly , which should be replaced with . The resulting approximation for

is about as good as , but it approaches from above. For example, .

The proof that is decreasing is familiar: the ratio is

which is less than 1 because

Sweet cancellation once again.

Thus, for all . The midpoint of this containing interval provides an even better approximation: for example, . The plot below displays the quality of approximation as logarithm of the absolute error:

- yellow dots show the error of Wallis partial products (2)-(3)
- blue is the error of
- red is for
- black is for

And all we had to do was to replace with or in the right places.