Added some info about where I found the pi approximation
This commit is contained in:
parent
0376b823cf
commit
32f23dad4a
|
@ -3,6 +3,9 @@
|
|||
import math
|
||||
|
||||
def bailey_borwein_plouffe_pi(n):
|
||||
"""
|
||||
See https://en.wikipedia.org/wiki/Approximations_of_%CF%80#Efficient_methods
|
||||
"""
|
||||
result = 0
|
||||
for k in range(n):
|
||||
result += (1/16)**k * ( 4/(8*k + 1) - 2/(8*k + 4) - 1/(8*k + 5) - 1/(8*k + 6))
|
||||
|
|
Loading…
Reference in New Issue
Block a user