Exemplo n.º 1
0
 public void NutonSqrt_Test(double number, int exp, double eps)
 {
     Assert.AreEqual(Mathematic.NutonSqrt(number, exp, eps), Math.Pow(number, (1 / (double)exp)), eps);
 }
        public void NutonSqrt_Number625Exp4_5Return()
        {
            double result = Mathematic.NutonSqrt(625, 4, 0.01);

            Assert.AreEqual(result, 5, 0.01);
        }