This program generates random numbers, and calculates Pi based off the
odds that those two numbers are co-prime. This was mostly just an
excuse for me to learn concurrency in Rust, which I was fairly
successful with. Change the
num_runs variable to increase or
decrease the number of trials.
This was inspired by this video by Matt Parker.
If you like this, you might also be interested in my pi-generator-from-blocks repository, where I calculate Pi using elastic collisions.