Question: In Java Approximate PI: PI can be approximated by the series: 4 * ( 1 - 1/3 + 1/5 - 1/7 + ... + (-1)^(i+1)

In Java

Approximate PI: PI can be approximated by the series: 4 * ( 1 - 1/3 + 1/5 - 1/7 + ... + (-1)^(i+1) / (2*i - 1) ) Note a^b here means a to the b power. Write a program that calculates PI for i = 10_000, i = 20_000, and i = 100_000 Developer Note: Does that summation start with 0 , 1, or some other value of i?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!