Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Just finished calculating pi to 30 trillion places.
#17
Pete, that should work but you need to perform all calculations to digits accuracy
there's a quartic version of the Gauss–Legendre algorithm for Pi, that is the accuracy quadruples on each iteration, but I find that's a bit slower https://en.wikipedia.org/wiki/Approximat...algorithms
the quartic version would be something like the following
Code: (Select All)
    y=2 : y=sqr(y)
    a=6 : a=a-4*y : y=y-1
    p=2
    for k=0 to int(log(NUMBER_OF_DIGITS)*0.72134752044448) '1/ln(4)
        y=y*y : y=y*y 'y^4
        y=1-y : y=sqr(y) : y=sqr(y)
        y=(1-y)/(1+y)
        p=p*4
        yk=y+1
        yk=yk*yk : yk=yk*yk
        a=a*yk-p*y*(1+y+y*y)
    next
    pie = 1/a
    print pie
Reply


Messages In This Thread
RE: Just finished calculating pi to 30 trillion places. - by Jack - 08-16-2022, 02:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  calculating ratios to find optimal grid layout madscijr 16 2,618 02-21-2025, 10:24 PM
Last Post: madscijr
  Searching sateliet calculating position program. Rudi59 4 1,228 09-20-2024, 10:50 PM
Last Post: Rudi59
  Calculating with complex numbers Kernelpanic 5 1,421 07-07-2022, 10:44 AM
Last Post: triggered

Forum Jump:


Users browsing this thread: 1 Guest(s)