An open API service indexing awesome lists of open source software.

https://github.com/andreafioraldi/grassi-pi

Calculate PI using random numbers and probability
https://github.com/andreafioraldi/grassi-pi

calculate-pi cpp

Last synced: about 1 year ago
JSON representation

Calculate PI using random numbers and probability

Awesome Lists containing this project

README

          

# Grassi-PI
Calculate PI using random numbers and probability.

It simulates throwing stones in a square.
The probability that a stone falls into the inscribed circle in the square is PI/4.
So we can calculate an approximation of PI as #stones fallen in the circle / #total stones * 4.