It may be covered by the articles referred to in the earlier answers, but if you integrate $$\frac{(x-x^2)^{8k+4}}{1+x^2}$$ over the unit interval (for $k$ a non-negative integer), and rewrite $(x-x^2)^{8k+4}$ as $x^{8k+4}(1+x^{2} -2x)^{4k+2}$, then rewrite $2^{4k+2}x^{12k+6}$ as $2^{4k+2}(x^{12k+6} +1) -2^{4k+2}$, you can see that you get a rational approximation to $2^{4k} \pi$ with an error less than $4^{-(8k+4)}$. 4^{-(8k+4)}$, where the rational approximation is the integral of a polynomial with integer coefficients over the unit interval. However the denominator is not usually so straightforward. 1 It may be covered by the articles referred to in the earlier answers, but if you integrate $$\frac{(x-x^2)^{8k+4}}{1+x^2}$$ over the unit interval (for$k$a non-negative integer), and rewrite$(x-x^2)^{8k+4}$as$x^{8k+4}(1+x^{2} -2x)^{4k+2}$, then rewrite$2^{4k+2}x^{12k+6}$as$2^{4k+2}(x^{12k+6} +1) -2^{4k+2}$, you can see that you get a rational approximation to$2^{4k} \pi$with an error less than$4^{-(8k+4)}\$. However the denominator is not usually so straightforward.