Exemple #1
0
 public void PiTest_When7Digits_ThenPi3_1415926()
 {
     VeryLongMath.SetPiAlgorithm(PiAlgorithm.BBP);
     Assert.IsTrue(VeryLongMath.Pi(7).ToString().StartsWith("3.1415926"));
 }
Exemple #2
0
 public void PiTestEuler_When5Digits_ThenPi3_14159()
 {
     VeryLongMath.SetPiAlgorithm(PiAlgorithm.Euler);
     Assert.IsTrue(VeryLongMath.Pi(5).ToString().StartsWith("3.14159"));
 }