Post Reply 
Yet another π formula
01-06-2021, 02:41 AM
Post: #8
RE: Yet another π formula
(01-06-2021 02:10 AM)toml_12953 Wrote:  
(01-04-2021 08:41 PM)Gerson W. Barbosa Wrote:  The algorithm is very simple, as tested on the HP-75C:

10 INPUT N
15 C=0
20 D=6*N*(N+1)+3/2
25 E=8*N
30 M=4*N*N-1
35 S=1
40 W=0
45 FOR K=1 TO N
50 W=W-S/M
55 C=-M*(M+1)/(4*(C+D))
60 M=M-E+4
65 D=D-E
70 E=E-8
75 S=-S
80 NEXT K
85 DISP S*(4*W+1/(C+D))+2
>run
?5
3.14159265359


I can get one thousand digits in little more than one fourth of a second on my old desktop computer, using that algorithm:

[size=x-small][font=Courier]n =  480 

How do you get all those digits? There's only one DISP statement. What is the precision of the interpreter on your PC?

Sorry, I forgot to mention I was using Decimal BASIC at maximum precision (1000 digits).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Yet another π formula - Gerson W. Barbosa - 01-04-2021, 08:41 PM
RE: Yet another π formula - Albert Chan - 01-05-2021, 10:50 PM
RE: Yet another π formula - Albert Chan - 01-06-2021, 01:32 AM
RE: Yet another π formula - Albert Chan - 01-07-2021, 09:56 PM
RE: Yet another π formula - toml_12953 - 01-06-2021, 02:10 AM
RE: Yet another π formula - Gerson W. Barbosa - 01-06-2021 02:41 AM
RE: Yet another π formula - ttw - 01-06-2021, 03:44 AM
RE: Yet another π formula - Albert Chan - 01-09-2021, 09:22 PM
RE: Yet another π formula - Albert Chan - 11-06-2021, 06:28 PM



User(s) browsing this thread: 1 Guest(s)