@ -6,6 +6,7 @@ double approximate_pi(unsigned int steps) {
double approximate_pi = 4.0;
bool subtract = true;
/* Gregory–Leibniz series */
for (unsigned int i = 2; i <= steps; i++) {
if (subtract) {
approximate_pi -= (4.0 / (i * 2 - 1));