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
- Host: GitHub
- URL: https://github.com/andreafioraldi/grassi-pi
- Owner: andreafioraldi
- License: bsd-3-clause
- Created: 2017-02-26T19:00:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-26T19:53:14.000Z (over 9 years ago)
- Last Synced: 2025-01-30T13:26:20.495Z (over 1 year ago)
- Topics: calculate-pi, cpp
- Language: C++
- Size: 52.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.