Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from numpy import math
- K = 1000
- inversePi = (2*math.sqrt(2))/9801 * sum(map(lambda k: (math.factorial(4*k)*(1103+26390*k))/((math.factorial(k)**4)*(396**(4*k))), range(K)))
- PI = 1/inversePi
- print(f'π = {PI}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement