public void VectorTest() { var exp = new Stdev(new[] { new Vector(new[] { new Number(2), new Number(4), new Number(9) }) }, 1); var result = (double)exp.Execute(); Assert.Equal(3.60555127546399, result, 14); }
public void TwoNumberTest() { var exp = new Stdev(new[] { new Number(4), new Number(9) }, 2); var result = (double)exp.Execute(); Assert.Equal(3.53553390593274, result, 14); }
public void ThreeNumberTest() { var exp = new Stdev(new[] { new Number(9), new Number(2), new Number(4) }, 3); var result = (double)exp.Execute(); Assert.Equal(3.60555127546399, result, 14); }
public void OneNumberTest() { var exp = new Stdev(new[] { new Number(4) }, 1); var result = (double)exp.Execute(); Assert.Equal(double.NaN, result); }
public void TwoNumberTest() { var exp = new Stdev(new[] { new Number(4), new Number(9) }, 2); var result = (double)exp.Execute(); Assert.Equal(3.53553390593274, result, 14); }
public void ThreeNumberTest() { var exp = new Stdev(new[] { new Number(9), new Number(2), new Number(4) }, 3); var result = (double)exp.Execute(); Assert.Equal(3.60555127546399, result, 14); }
public void OneNumberTest() { var exp = new Stdev(new[] { new Number(4) }, 1); var result = (double)exp.Execute(); Assert.Equal(double.NaN, result); }
public void StdevShouldCalculateCorrectResult() { var func = new Stdev(); var args = FunctionsHelper.CreateArgs(1, 3, 5); var result = func.Execute(args, _parsingContext); Assert.AreEqual(2d, result.Result); }
public void StdevShouldIgnoreHiddenValuesWhenIgnoreHiddenValuesIsSet() { var func = new Stdev(); func.IgnoreHiddenValues = true; var args = FunctionsHelper.CreateArgs(1, 3, 5, 6); args.Last().SetExcelStateFlag(ExcelCellState.HiddenCell); var result = func.Execute(args, _parsingContext); Assert.AreEqual(2d, result.Result); }
public void VectorTest() { var exp = new Stdev(new[] { new Vector(new[] { new Number(2), new Number(4), new Number(9) }) }, 1); var result = (double)exp.Execute(); Assert.Equal(3.60555127546399, result, 14); }