Post Reply 
Yet another π formula
11-06-2021, 06:28 PM (This post was last modified: 11-07-2021 11:09 AM by Albert Chan.)
Post: #16
RE: Yet another π formula
This pi formula is very similar to zeta(2) alternating sum formula

(11-05-2021 03:55 PM)Albert Chan Wrote:  
(10-31-2021 03:40 PM)Albert Chan Wrote:  Let s = (-1)^n, x=n*n+n+1, T's = triangular number

ζ(2) ≈ (2 - 2/2^2 + 2/3^2 - ... + s*2/n^2)

       - s/(x - 1/(x+4*T1 - 2^4/(x+4*T2 - 3^4/(x+4*T3 - 4^4/(x+4*T4 - ...
...
We can spend more time summing the alternating series, less time doing CF corrections.
In the end, we may come out ahead.

As an experiment, we cut down CF terms in half. (p pairs alternating series, do p CF terms)
Bonus: summing alternating series pairwise also made final sum more accurate.

Apply the same idea here, we have this for estimating PI
Code:
OPTION ARITHMETIC DECIMAL_HIGH
10 INPUT  PROMPT "p (pairs) = ":p
   LET x = (8*p+4)*p + 1.5
   LET a = 0
   LET b = 0
   FOR i = p TO 2 STEP -1
      LET t = i*i
      LET a = a + 4/((i-0.75)*(16*t-1))
      LET b = t*(4*t-1) / (x+4*(t+i)-b)
   NEXT i
   LET r = 1/(x-3/(x+8-b)) + a + 46/15   
   PRINT "Accurate digits ="; 1-LOG10(MAX(ABS(PI-r),1E-1000))  
   GOTO 10
END

p (pairs) = 100
Accurate digits = 308.79106444764398
p (pairs) = 101
Accurate digits = 311.85336518362854
p (pairs) = 300
Accurate digits = 921.2386113713281
p (pairs) = 301
Accurate digits = 924.30082763127136

For p=326, it reached 1000 digits full precision.
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 - 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)