Advertisement
EXTREMEXPLOIT

Pi Digits

Oct 28th, 2020
2,165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. from numpy import math
  2.  
  3. K = 1000
  4. 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)))
  5. PI = 1/inversePi
  6. print(f'π = {PI}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement