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, not only integer.
note 5: Your output need not contain the .
. Just print out the numbers.
note 6: To clarify, also as an answer to a comment, you are computing 30000 digits not the 30000'th' digit. You have to print out 30000 numbers.