Created
October 12, 2018 14:55
-
-
Save telliott99/433a73eb708e25a1d6f6ba5291f48ebf to your computer and use it in GitHub Desktop.
This file contains 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
def next(S,C,T): | |
C2 = (0.5 * (1 + C))**0.5 | |
S2 = 0.5 * S / C2 | |
T2 = S/(1+C) | |
return S2,C2,T2 | |
S = 1/2**0.5 | |
C = S | |
T = S/C | |
n = 4 | |
for i in range(15): | |
print "round " + str(i+1) | |
print n | |
print n * S | |
print n * T | |
n *= 2 | |
S,C,T = next(S,C,T) | |
import math | |
print math.pi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment