Created
March 11, 2020 14:30
-
-
Save mraleph/4455eac700ffba91f484d40f1f3bd9a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/SuperPi_flutter/lib/pi_calculator.dart b/SuperPi_flutter/lib/pi_calculator.dart | |
index 39faf59..b519f6a 100644 | |
--- a/SuperPi_flutter/lib/pi_calculator.dart | |
+++ b/SuperPi_flutter/lib/pi_calculator.dart | |
@@ -30,7 +30,7 @@ class PiCalculator { | |
double yk1 ; | |
for (int i = 0; i < k; i++) { | |
yk1 = (1 - math.pow((1 - yk * yk * yk * yk),(0.25)))/(1 + math.pow((1 - yk * yk * yk * yk),(0.25))); | |
- ak1 = ak * math.pow((1 + yk1), 4) - math.pow(2, 2 * i + 3) * yk1 * (1 + yk1 + yk1 * yk1); | |
+ ak1 = ak * math.pow((1 + yk1), 4.0) - math.pow(2.0, (2 * i + 3) + 0.0) * yk1 * (1 + yk1 + yk1 * yk1); | |
yk = yk1; | |
ak = ak1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment