Post Reply 
Creating digits of pi
02-10-2018, 04:42 PM (This post was last modified: 02-10-2018 05:11 PM by toml_12953.)
Post: #22
RE: Creating digits of pi
(02-10-2018 12:44 PM)Mike (Stgt) Wrote:  Could someone of the interested (Decimal BASIC admirer, etc.) please confirm this Ramanujan–Sato of 1993 works? I fail with it, get Pi = 4.1748739, what is a bit too far off.
I assume a typo in the Wiki.

Ciao.....Mike

The quadratic convergence works:

Code:
OPTION ARITHMETIC DECIMAL_HIGH
LET a=SQR(2)
LET b=0
LET p=2+SQR(2)
LET n=1
DO UNTIL a=1
   LET an=a
   LET bn=b
   LET pn=p
   LET a=(SQR(an)+1/SQR(an))/2
   LET b=((1+bn)*SQR(an))/(an+bn)
   LET p=((1+a)*pn*b)/(1+b)
LOOP
PRINT p
END

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Creating digits of pi - brickviking - 02-06-2018, 12:24 AM
RE: Creating digits of pi - Joe Horn - 02-06-2018, 01:38 AM
RE: Creating digits of pi - toml_12953 - 02-06-2018, 09:24 PM
RE: Creating digits of pi - brickviking - 02-06-2018, 10:38 PM
RE: Creating digits of pi - brickviking - 02-08-2018, 04:22 AM
RE: Creating digits of pi - toml_12953 - 02-08-2018, 01:02 PM
RE: Creating digits of pi - TASP - 02-07-2018, 10:30 PM
RE: Creating digits of pi - pier4r - 02-09-2018, 02:59 PM
RE: Creating digits of pi - emece67 - 02-10-2018, 09:14 PM
RE: Creating digits of pi - TASP - 02-11-2018, 12:12 AM
RE: Creating digits of pi - ttw - 02-12-2018, 03:59 AM
RE: Creating digits of pi - EdS2 - 02-17-2018, 12:27 PM
RE: Creating digits of pi - EdS2 - 02-21-2018, 11:01 AM
RE: Creating digits of pi - pier4r - 02-17-2018, 04:25 PM
RE: Creating digits of pi - brickviking - 02-17-2018, 09:27 PM
RE: Creating digits of pi - pier4r - 02-23-2018, 01:34 PM
RE: Creating digits of pi - SlideRule - 05-13-2018, 05:09 PM



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