Last active
August 31, 2016 17:04
-
-
Save angeris/531426c9723773c4e731 to your computer and use it in GitHub Desktop.
Runs different, crappy ways of estimating Pi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numpy import * | |
N, L = 1e8, 10 | |
print("Here's your crappy estimation of pi: {}".format((sum(exp(-(random.rand(N)*2*L-L)**2))*2*L/N)**2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment