CodingTrain / CodingTrain/Suggestion-Box

Pi day approximation

Open
#1,620 1 comment 0 reactions 0 assignees View on GitHub
Pi Day
Dominant language
No language data
Stars
570
Forks
85
PR merge metrics
No merged PRs in 30d

Description

Hi Daniel, for Pi day this year, I was thinking you can try approximating pi by randomly generating pairs of natural numbers and checking the proportion that are relatively prime. It should be around 6/PI^2, so by inverting the experimental proportion, multiplying it by six, and taking its square root, you should get an approximation of pi. The inverse of Euler’s prime product works out to 6/PI^2 when s=2, and it’s equivalent to the probability that two randomly chosen natural numbers are both not both multiples of 2, not both multiples of three, not both multiples of five, etc. Mathologer has a great video about this:

https://www.youtube.com/watch?v=LFwSIdLSosI

I’m looking forward to seeing it if you’re interested!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.