EllipticPi

This program calculates the π, using CCore Integer. The interval arithmetic is used to provide a error estimate.

To specify the desired precision you have to edit the function main(), uncomment the line you want to run:


int main()
 {
  ReportException report;
  
  try
    {
     {
      Putobj(Con,"--- EllipticPi 1.00 ---\n--- Copyright (c) 2015 Sergey Strukov. All rights reserved. ---\n\n");

      Run(1000);
      //Run(10000);
      //Run(100000);
      //Run(400000);
      //Run(1000000);
      //Run(4000000);
     }
     
     report.guard();
     
     return 0;
    }
  catch(CatchType)
    {
     return 1;
    }
 }

The output is placed in the file piXXX.txt:


3.
1415926535 8979323846 2643383279 5028841971 6939937510
5820974944 5923078164 0628620899 8628034825 3421170679
8214808651 3282306647 0938446095 5058223172 5359408128
4811174502 8410270193 8521105559 6446229489 5493038196
4428810975 6659334461 2847564823 3786783165 2712019091
4564856692 3460348610 4543266482 1339360726 0
+- 1 E-291


time = 00:00:00