Re: Calculate PI

2002-11-03 Thread Sven Bentlage
[EMAIL PROTECTED] Subject: Calculate PI Hi everyone! I am trying to write a program calculating pi. The formula I would like to use is pi = 4x( (1/1) - (1/3) + (1/5) - (1/7) + (1/9) - (1/11) ) or $pi = 4x ( (1/$y) - ) My problem is how to raise the $y by 2 and how to switch "+

Re: Calculate PI

2002-11-03 Thread Randal L. Schwartz
> "Sven" == Sven Bentlage <[EMAIL PROTECTED]> writes: Sven> Hi everyone! Sven> I am trying to write a program calculating pi. Sven> The formula I would like to use is Sven> pi = 4x( (1/1) - (1/3) + (1/5) - (1/7) + (1/9) - (1/11) ) Sven> or Sven> $pi = 4x ( (1/$y) - ...

Calculate PI

2002-11-02 Thread Sven Bentlage
Hi everyone! I am trying to write a program calculating pi. The formula I would like to use is pi = 4x( (1/1) - (1/3) + (1/5) - (1/7) + (1/9) - (1/11) ) or $pi = 4x ( (1/$y) - ) My problem is how to raise the $y by 2 and how to switch "+" and "-" while calculating the formula. For