Пример #1
0
 public void validoMN()
 {
     var calculo = new Calculo("1", "2", "-3");
     double r1 = 0, r2 = 0;
     calculo.metodoNewton(ref r1, ref r2);
     Assert.AreEqual(Math.Round(r1, 4), 1);
     Assert.AreEqual(Math.Round(r2, 4), -3);
 }
Пример #2
0
 public void MNdivideZero()
 {
     var calculo = new Calculo("2", "0", "3");
     double r1 = 0, r2 = 0;
     calculo.metodoNewton(ref r1, ref r2);
     Assert.AreEqual(r1, double.NaN);
     Assert.AreEqual(r2, double.NaN);
 }