Skip to content

typewriter1/pi-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Pi calculation

Run pi.py to calculate pi. Leave it running to get more accurate results.

How it Works

Repeatedly selects random points in a one-by-one square. There is a one-quarter pi chance that this point will be less than 0.5 in distance from the origin, so by multiplying the fraction of points whithin 0.5 from the origin by 4, an increasingly close value of pi is found.

About

Calculates pi - leave it running for an increasingly close approximation of pi.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages