Thread View: sci.math.num-analysis
4 messages
4 total messages
Started by Eric Perkins
Tue, 08 Sep 1992 17:44
Computing PI:
Author: Eric Perkins
Date: Tue, 08 Sep 1992 17:44
Date: Tue, 08 Sep 1992 17:44
12 lines
892 bytes
892 bytes
There was an article posted a while back asking for an infinite PI program. Did anyone have such a program ? The sender said to reply by mail, but if someone has such a program could they just post it here? Also, does someone have a way to verify that PI to x number of digits is correct. Lets say I have a file with a sequence of numbers how can I prove that these are indeed PI? -- Eric Perkins -- perkins@tallis.enet.dec.com
Re: Computing PI:
Author: Wayne Lui
Date: Fri, 11 Sep 1992 03:54
Date: Fri, 11 Sep 1992 03:54
28 lines
1062 bytes
1062 bytes
In article <1708@sousa.ltn.dec.com> perkins@sousa.ltn.dec.com (Eric Perkins)
writes:
>There was an article posted a while back asking for an infinite
>PI program. Did anyone have such a program ?
Here goes:
program pi
implicit double precision (a-h,o-z)
c
a=1.d0
b=1.d0/dsqrt(2.d0)
t=.25d0
x=1.d0
c
do 10 i=1,10
y=a
a=.5d0*(a+b)
b=dsqrt(b*y)
t=t-x*(y-a)*(y-a)
x=2.d0*x
p0=p1
p1=.25d0*(a+b)*(a+b)/t
write(6,*)i,p1
10 continue
c
stop
end
Re: Computing PI:
Author: Fredric A. Isaman
Date: Sat, 12 Sep 1992 19:27
Date: Sat, 12 Sep 1992 19:27
3 lines
626 bytes
626 bytes
I know some have asked for programs to generate pi. I was wondering if anyone knows where I could get a file containing pi out a few thousand places without having to compute them myself? Many thanks.
Re: Computing PI:
Author: T.R.Hopkins
Date: Mon, 14 Sep 1992 15:00
Date: Mon, 14 Sep 1992 15:00
11 lines
863 bytes
863 bytes
In article <BuHCqL.AGC@acsu.buffalo.edu> isaman@acsu.buffalo.edu (Fredric A. Isaman) writes: >I know some have asked for programs to generate pi. I was wondering >if anyone knows where I could get a file containing pi out a few thousand >places without having to compute them myself? Many thanks. The first 100000 digits are ftp'able from unix.hensa.ac.uk the required file is pub/netlib/pub/misc/pi Tim
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads