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]); } }
public void RootIntArrayTest() { double[] d = SquareRoot.Root(f); int i = 0; foreach (double z in d) { Assert.AreEqual(SquareRoot.Root(f[i]), z); i++; } }
public void RootDoubleArrayTest() { double[] y = SquareRoot.Root(e); int i = 0; foreach (double w in y) { Assert.AreEqual(SquareRoot.Root(e[i]), w); i++; } }
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); }
public void RootDoubleTest() { Assert.AreEqual(6.7, SquareRoot.Root(c)); }
public void RootTest() { Assert.AreEqual(3, SquareRoot.Root(a)); }
public void RootTest() { Assert.AreEqual(2.236, SquareRoot.Root(b)); }
public dynamic Root(dynamic a) { result = SquareRoot.Root(a); return(result); }
public void SqrRootDoubleTest() { double c = SquareRoot.Root(i); Assert.AreEqual(1.5, c); }
public void SqrRootIntTest() { int c = SquareRoot.Root(h); Assert.AreEqual(12, c); }
public void RootDoubleTest() { Assert.AreEqual(8.0, SquareRoot.Root(b)); }
public void SquareRootDoubleTest() { Assert.AreEqual(1.5, SquareRoot.Root(b)); }