[EN] Approximating pi by Binomial Averaging

Consider this generator, which implements the Taylor series for arctan(1): function* piTaylor() { let res = 0; let sign = 1; for (let i = 1; true; i += 2) { res += sign / i; sign = -sign; yield 4 * res; } } This function generates successive approximations of pi using the formula: π/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 - ... Each term alternates between positive and negative, and we multiply the result…