From ed40922f5241bb0f0b2dc27f4db5e906401e602a Mon Sep 17 00:00:00 2001 From: neingeist Date: Sat, 15 Feb 2014 13:57:53 +0100 Subject: [PATCH] Add comment about which method is used to approximate pi --- approximate-pi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/approximate-pi.c b/approximate-pi.c index 9dcf6f8..867b959 100644 --- a/approximate-pi.c +++ b/approximate-pi.c @@ -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));