diff --git a/ex_01_03.py b/ex_01_03.py index d0e1b46..2c56197 100644 --- a/ex_01_03.py +++ b/ex_01_03.py @@ -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))