Back to projects
Nov 29, 2024
2 min read

Pi Approximation Calculator

This project demonstrates the approximation of π using the Leibniz series and Larson's formula.

About the Project

This project approximates π using the Leibniz series and Larson’s formula. The user can adjust the number of iterations to observe how the approximation improves with more iterations.

Key Features

  1. Leibniz Series: The core of this project is the approximation of π using the Leibniz series.
  2. Adjustable Iterations: You can adjust the number of iterations using a slider to see how the precision of the approximation improves.
  3. Larson’s Formula: An additional formula is included for comparison, illustrating different methods of approximation.

How to Use

  1. Adjust the Iterations: Use the slider to change the number of iterations.
  2. Observe the Approximation: Watch as the approximation of π becomes more accurate with higher iterations.

Example of Approximation

Given the number of iterations set to 1000, the π approximation may look something like this:

π ≈ 3.14159

Conclusion

This tool allows you to explore how the Leibniz series and Larson’s formula can be used to approximate π, demonstrating the effect of iteration count on precision.

Contributions

Contributions are welcome! If you have any ideas to improve the app or encounter any bugs, feel free to open an issue or submit a pull request on GitHub.


Thank you for exploring this project! If you have any questions or suggestions, please feel free to open an issue or contact us directly.