Created
July 25, 2017 22:38
-
-
Save back-seat-driver/77df8af45dbb5cec8cc604ebbff6a967 to your computer and use it in GitHub Desktop.
Pi Convergence
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
i = 2 | |
n_0 = 4 | |
while True==True: | |
v_2 = (float(1)/float((i*4)-3)) | |
v_3 = (float(1)/float((i*4)-5)) | |
n_1 = float(n_0) + (4 * (v_2 - v_3)) | |
n_0 = float(n_1) | |
i+=1 | |
print(n_1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment