64.6k views
4 votes
Π/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 ...

write an algorithm to compute π. because the formula is an infinite series and an algorithm must stop after a finite number of steps, you should stop when you have the result determined to six significant digits

User Yshmarov
by
4.3k points

1 Answer

5 votes

Answer: Pi= 4 - 4/3 + 4/5 - 4/7 + 4/9 ...

Step-by-step explanation:

Is the same as the example,

If Π/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 ...

Then

(Π/4 )*4= 4*(1 - 1/3 + 1/5 - 1/7 + 1/9 ...)

Π =4 - 4/3 + 4/5 - 4/7 + 4/9 ...

The way to write this is

Sum(from n=0 to n=inf) of (-1)^n 4/(2n+1)

(photo)

Π/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 ... write an algorithm to compute π. because the formula-example-1
User Jolmos
by
4.8k points