https://github.com/tofran/pi-from-random-numbers
Unusual way to achieve π: Generating Pi from random numbers
https://github.com/tofran/pi-from-random-numbers
coprime fun math pi pi-day piday useless
Last synced: 10 months ago
JSON representation
Unusual way to achieve π: Generating Pi from random numbers
- Host: GitHub
- URL: https://github.com/tofran/pi-from-random-numbers
- Owner: tofran
- Created: 2017-03-13T22:45:57.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-14T11:18:41.000Z (about 9 years ago)
- Last Synced: 2025-04-02T08:47:44.052Z (about 1 year ago)
- Topics: coprime, fun, math, pi, pi-day, piday, useless
- Language: Python
- Homepage:
- Size: 92.8 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unusual way to achieve π: Generating Pi from random numbers
The purpose of this repo is to gather (programming) solutions for the peculiar procedure for generating / achieving [π (Pi)][Pi] that [Matt Parker] presented in [this video][Video].
## Why
1. In commemoration for [Pi Day] 2017.
2. Having fun.
3. No apparent logic reason.
## How does it work
Since the **Probability of Two (random) Integers Being [Coprime][Coprime integers]** is given by:
 [Proof and demonstration]
We can generate lots of numbers and calculate π by:

Watch Matt Parker generating π from 1,000 random numbers by rolling a dice on [here][Video full].
## Acknowledgments
All solutions are from these users (in no particular order), some are quite efficient others not so much. Regardless thanks very much.
* Matt Parker
* Torfi Þorgrímsson
* TheWioreks
* Alyan Zahid
* Andriamanitra
* Bendik Mihle Hansen
* Buttercak3
* Ecrou Ecrouisseur
* Georgi Iliev
* Gerard Kool
* Pedro Sousa
* Bengineer8
* 梁瑋瀚
* TheWioreks
* LaugeRønberg
* Justin Murtagh
* Ando Bando
* Chris Pedro
* Alex Walters
* Mark Johnson
* Clark Cox
* navkums
* Bebopity
* GLaDHuRriCAn
* Tom Spink
* seevernet1
* Cody Woodard
* JustForFunc
* John Lindstedt
* Erik Lindemann
* Altoids The Destroyer
* limzykenneth
* MDuh Gaming
* QuomoZ
* elijah finn
* Josh Grigonis
* wHiTEY 542
* Bryan Ng
**Happy Pi Day!**
[Pi]: https://en.wikipedia.org/wiki/Pi
[Pi Day]: https://en.wikipedia.org/wiki/Pi_Day
[Coprime integers]: https://en.wikipedia.org/wiki/Coprime_integers
[Proof and demonstration]: http://www.cut-the-knot.org/m/Probability/TwoCoprime.shtml
[Video]: https://youtu.be/RZBhSi_PwHU
[Video full]: https://www.youtube.com/watch?v=ESU4KdRLzu0
[Matt Parker]: http://standupmaths.com/