Jump to content

Programming Excel to Calculate Pi


Recommended Posts

Guest bkronbergs
Posted

Could someone please tell me how to calculate pi in the windows program excel please? If you could post the solution under this thread, or just email it, I would be very grateful. THANKS!

Posted

I can't remember if the BASIC style programming in Excel allows x=x+1 style arrangements, but if it does, use pi/4=1 - 1/3 + 1/5 - 1/7 + 1/9 - . . .

 

(in basic this would be along the lines of

 

10 FOR N = 1 TO 100

20 LET Q = 1/(2N-1)

30 LET P = P + Q

40 NEXT N

50 LET P = P*4

60 PRINT P)

Posted

How about using a cell and writing

=ACOS(-1),

that gives you PI also, until whatever decimal precision that excel uses, probably enough for your calculations

 

Mandrake

Posted

It should be noted that excel will only go to a certain number of decimal places anyway, so there's not much point.

Posted

Read the Fudging Question I reckon.

 

IE - when someone posts asking HOW to calculate Pi in Excel then Pi to 10,000 dp's isn't a very useful response.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.