/Grassi-PI

Calculate PI using random numbers and probability

Primary LanguageC++BSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

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.