Compute 30000 digits of the mathematical constant π, with the fastest code.
Implement in any computer programming language that I can run in my 64 bit Linux machine. You should provide your compiler optimization options if any. I am ready to install a new compiler or language runtime to run your code, given that I am not spending any money.
The code that finishes calculation and prints the output in the shortest time wins! I will measure the running time with the time
command.
note 1: The program should be single threaded.
note 2: With 3.14, the number of digits is 3; with 3.1415, 5, and so on.
note 3: Hard coding π is not allowed.
note 4: Now you can use any number form in your code, not only integer.
note 5: Your output, which should be in decimal digits, need not contain the .
. Just print out the numbers.
note 6: Your last digit should not be rounded up. If the next digit after the last is 5 or more, you should round up your last digit still leave the last digit as is.
Since this question was marked as duplicate, to thisthis question. I should explain that this is a 'fastest-code' question not 'code-golf' and thus not a dupliate. The 'code-golf' answers are not well suited as an answer to this question; they are not the 'fastest'.