Pi (divided by 4) can be approximated by the following infinite series:
pi/4 = 1 - 1/3 + 1/5 - 1/7 + ...
For a given number of terms (n), return the difference between the actual value of pi and this approximation of the constant.
Also, try Problem 2909, a slightly harder variant of this problem.
198 Solvers
Create an index-powered vector
232 Solvers
Area of an equilateral triangle
1703 Solvers
442 Solvers
211 Solvers
Problem Tags