/Pi

Approximation of Pi using different methods.

Primary LanguageJupyter NotebookGNU General Public License v3.0GPL-3.0

Approximation of Pi

This project explores various methods to approximate the value of pi. The following methods are implemented:

  1. Infinite Series
  2. Monte Carlo Simulation
  3. Co-Prime Method
  4. Dart Game

Directory Structure:

The project directory is structured as follows:

pi_approximation/

  • Co-Prime Method/
    • notebook.ipynb
  • Dart Game/
    • notebook.ipynb
  • Infinite Series/
    • notebook.ipynb
  • Monte Carlo Simulation/
    • notebook.ipynb
  • Miscellaneous/
    • notebook.ipynb
  • README.txt
  • requirements.txt

Usage:

To run the code, make sure you have the required dependencies installed. You can install them using the requirements.txt file:

pip install -r requirements.txt

Navigate to the respective method's directory and open the corresponding notebook file. Execute the code cells to see the results of the approximation method.

Results:

The notebook files for each method contain the code and output showcasing the approximation of pi. The results are displayed with an accuracy metric indicating how close the approximation is to the true value of pi.

License:

This project is licensed under the MIT License.