## Calculating Pi

In what way can i calculate PI and output the result to the screen ?
I heard from my friedn that MC method is good but is there any other ways to do that ? also, how many decimal digits am I able to output the result ?

-KMCB1234

 PhysOrg.com science news on PhysOrg.com >> 'Whodunnit' of Irish potato famine solved>> The mammoth's lament: Study shows how cosmic impact sparked devastating climate change>> Curiosity Mars rover drills second rock target
 Well for what purpose are you trying to calculate pi and what screen are you displaying it on??
 If you are trying to write something to test the speed of computer or machine... or if you just want a basic way of calculating pi i might suggest since $$arctan(1)=\frac{\pi}{4} = 1 - \frac{1}{3}+\frac{1}{5}-\frac{1}{7}+\frac{1}{9}$$... just multiply by 4 and have your program run a loop $$\pi= 4-\frac{4}{3}+\frac{4}{5}-\frac{4}{7}+\frac{4}{9}$$...

## Calculating Pi

Example code for TI-83

Pgrm Pi
Clrhome
4>p
3>n
0>s
lbl AA
Disp "Pi",p
If s=0
then
p-(4/n)>p
1>s
n+2>n
goto AA
End
If s=1
then
p+(4/n)>p
0>s
n+2>n
End
Goto AA

 That should work I haven't tested it I just wrote it... I wrote a similar program a long time ago and I think I did something similar. This isn't the quickest way to calculate pi but its a good one if you want to see digits slowly change into pi.