Exemplo n.º 1
0
 public void SqrRootDoubleArrayTest()
 {
     double[] x = { 1.2, 2.5, 6.2 };
     double[] c = SquareRoot.Root(arrayC);
     for (int i = 0; i < c.Length; i++)
     {
         Assert.AreEqual(x[i], c[i]);
     }
 }
Exemplo n.º 2
0
        public void RootIntArrayTest()
        {
            double[] d = SquareRoot.Root(f);
            int      i = 0;

            foreach (double z in d)
            {
                Assert.AreEqual(SquareRoot.Root(f[i]), z);
                i++;
            }
        }
Exemplo n.º 3
0
        public void RootDoubleArrayTest()
        {
            double[] y = SquareRoot.Root(e);
            int      i = 0;

            foreach (double w in y)
            {
                Assert.AreEqual(SquareRoot.Root(e[i]), w);
                i++;
            }
        }
Exemplo n.º 4
0
        public static double StandardDev(dynamic values)
        {
            double mean       = StatisticMean.Mean(values);
            double difference = 0;
            double variance   = 0;

            foreach (int a in values)
            {
                difference = Subtraction.Subtract((int)mean, a);
                difference = Math.Pow(difference, 2);
                variance   = addition.Sum(variance, (int)difference);
            }
            int ValueCount = Helpers.Arrays.Length(values);

            variance = Division.Quotient(variance, ValueCount);
            double standardDev = SquareRoot.Root(variance);

            return(standardDev);
        }
Exemplo n.º 5
0
 public void RootDoubleTest()
 {
     Assert.AreEqual(6.7, SquareRoot.Root(c));
 }
Exemplo n.º 6
0
 public void RootTest()
 {
     Assert.AreEqual(3, SquareRoot.Root(a));
 }
Exemplo n.º 7
0
 public void RootTest()
 {
     Assert.AreEqual(2.236, SquareRoot.Root(b));
 }
 public dynamic Root(dynamic a)
 {
     result = SquareRoot.Root(a);
     return(result);
 }
Exemplo n.º 9
0
        public void SqrRootDoubleTest()
        {
            double c = SquareRoot.Root(i);

            Assert.AreEqual(1.5, c);
        }
Exemplo n.º 10
0
        public void SqrRootIntTest()
        {
            int c = SquareRoot.Root(h);

            Assert.AreEqual(12, c);
        }
Exemplo n.º 11
0
 public void RootDoubleTest()
 {
     Assert.AreEqual(8.0, SquareRoot.Root(b));
 }
Exemplo n.º 12
0
 public void SquareRootDoubleTest()
 {
     Assert.AreEqual(1.5, SquareRoot.Root(b));
 }