The following expression is an approximation of PI, where N determines the precision.
$$\pi (N) = \frac{4}{N} \sum_{i=1}^{N}\frac{1}{1 +\left ( \frac{i -\frac{1}{2}}{N} \right )^{2}}$$
If I want to find an approximation with an error less than a given amount $E$, I would like to find mathematically the N I have to use, or at least some boundaries where that N has to be.
I've tried approximating the error function, but I couldn't get anything precise enough.
Take into account that for the given error $E$ I can obtain $\pi(N)$.