The Almkvist-Giullera formula for calculating   1/π2   is based on the Calabi-Yau
differential equations of order 4 and 5,   which were originally used to describe certain manifolds
in string theory.



The formula is:

 1/π2 = (25/3) ∑0∞ ((6n)! / (n!6))(532n2 + 126n + 9) / 10002n+1


This formula can be used to calculate the constant   π-2,   and thus to calculate   π.

Note that, because the product of all terms but the power of 1000 can be calculated as an integer,
the terms in the series can be separated into a large integer term:

  (25) (6n)! (532n2 + 126n + 9) / (3(n!)6)      (***)
multiplied by a negative integer power of 10:

  10-(6n + 3) 


Task

 Print the integer portions (the starred formula, which is without the power of 1000 divisor) of the first 10 terms of the series.
 Use the complete formula to calculate and print π to 70 decimal digits of precision.


Reference

  Gert Almkvist and Jesús Guillera, Ramanujan-like series for 1/π2 and string theory, Experimental Mathematics, 21 (2012), page 2, formula 1.


F isqrt(BigInt =x)
   BigInt q = 1
   BigInt r = 0
   BigInt t
   L q <= x
      q *= 4
   L q > 1
      q I/= 4
      t = x - r - q
      r I/= 2
      I t >= 0
         x = t
         r += q
   R r
 
F dump(=digs, show)
   V gb = 1
   digs++
   V dg = digs + gb
   BigInt t1 = 1
   BigInt t2 = 9
   BigInt t3 = 1
   BigInt te
   BigInt su = 0
   V t = BigInt(10) ^ (I dg <= 60 {0} E dg - 60)
   BigInt d = -1
   BigInt _fn_ = 1
 
   V n = 0
   L n < dg
      I n > 0
         t3 *= BigInt(n) ^ 6
      te = t1 * t2 I/ t3
      V z = dg - 1 - n * 6
      I z > 0
         te *= BigInt(10) ^ z
      E
         te I/= BigInt(10) ^ -z
      I show & n < 10
         print(‘#2 #62’.format(n, te * 32 I/ 3 I/ t))
      su += te
 
      I te < 10
         I show
            digs--
            print("\n#. iterations required for #. digits after the decimal point.\n".format(n, digs))
         L.break
 
      L(j) n * 6 + 1 .. n * 6 + 6
         t1 *= j
      d += 2
      t2 += 126 + 532 * d
 
      n++
 
   V s = String(isqrt(BigInt(10) ^ (dg * 2 + 3) I/ su I/ 32 * 3 * BigInt(10) ^ (dg + 5)))
   R s[0]‘.’s[1 .+ digs]
 
print(dump(70, 1B))