This application uses integral calculus to estimate the digits of π as described in this document.
You can launch the program without any command-line arguments and it will not show intermediate steps, and iterate the sum 1 000 times.
You can use -i
followed by the number of iteration you would like the sum to be executed. For instance:
java PiCalculator.java -i 25
...will iterate through the loop 25 times.
By default, the program will not show the intermediate values of π. You can use -s
to show them
java PiCalculator.java -s
Simply execute calculateur_pi.py
using Python 3 on the terminal.
python3 calculateur_pi.py
The program will then ask you how many iteration of the loop you would like to run. If you would like 5 iteration of the loop for instance, you would enter 5.
Nombre de repetition de la boucle:
5