Solving Pi
Tim Kelley
ctk at ecsvax.UUCP
Mon Jul 29 11:24:25 AEST 1985
In article <11307 at watnot.UUCP> cagordon at watnot.UUCP (Chris A. Gordon) writes:
>In article <187 at ski.UUCP> eeg at ski.UUCP (eeg systems (bcx) writes:
>[ article deleted - program to calculate pi to X digits ]
>>** infinity infinity
>>** ____ 16*(-1e(k+1)) ____ 4*(-1e(k+1))
>>** \ \
>>** pi = > ------------- - > ------------ (Expression 1)
>>** / /
>>** ---- (2k-1)*5e(2k-1) ---- (2k-1)*239e(2k-1)
>>** k = 1 k = 1
>>**
>
>Here is a more simple sum-evaluation of pi (thought I don't know if it will work
>with the original program):
>
> oo
> ---- k-1
> | | \ (-1)
> pi = +--+ > ---------- (Expression 2)
> | / 2k-1
> ----
> k=1
Friends, I hate to include the complete text of the article I'm responding
to but I have no alternative. The reason expression 1 is better than
expression 2 is that the series in 1 converges faster than that in 2.
One can check this out with a programmable calculator. Expression 2 will
run all night and give you maybe 3 figures. If you want 3 digits of accuracy
from expression 2 you'd need about 1000 terms; 4 digits would require 10,000.
--
C.T. Kelley decvax!mcnc!ecsvax!ctk
Dept. of Math. N.C. State U. Box 8205
Raleigh, N.C. 27695-8205, 919-737-7895
More information about the Comp.sources.unix
mailing list