Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # pi_spigot.py
- def pi_spigot():
- q, r, t, j = 1, 180, 60, 2
- while True:
- u, y = 3*(3*j+1)*(3*j+2), (q*(27*j-12)+5*r)//(5*t)
- print(y)
- q, r, t, j = 10*q*j*(2*j-1), 10*u*(q*(5*j-2)+r-y*t), t*u, j+1
- pi_spigot()
Add Comment
Please, Sign In to add comment