Closed cpp-monster closed 1 year ago
Would you add perl to the comparison?
#!/usr/bin/env perl use strict; open(my $fh, "<rounds.txt") or die "$!"; my $rounds = <$fh> || die "$!"; my $x = 1.0; my $pi = 1.0; for my $i (2..$rounds+2) { $x *= -1.0; $pi += $x / (2 * $i - 1); } $pi *= 4; printf("%.17g", $pi);
Hi @cpp-monster thank you for your suggestion.
I'm sorry to say that I'm currently not focusing on the project so I don't plan to extend the scope, but I'm open to pull requests. 🙂
Would you add perl to the comparison?