public void AccuracyTest() { SummaryStatistics s1 = new SummaryStatistics(); SummaryStatistics s2 = new SummaryStatistics(); foreach (double omx in TestUtilities.GenerateRealValues(1.0E-24, 1.0, 1000000)) { double x = 1.0 - omx; double f1 = Math.Sqrt((1.0 - x) * (1.0 + x)); double f2 = Math.Sqrt(1.0 - x * x); DoubleDouble xe = (DoubleDouble)x; DoubleDouble fc = DoubleDouble.Sqrt(DoubleDouble.One - xe * xe); double e1 = Math.Abs((double)(f1 - fc)); double e2 = Math.Abs((double)(f2 - fc)); s1.Add(e1); s2.Add(e2); } }
/// <summary> /// Add another metric to the set of observations /// </summary> /// <param name="metric">The metric being accumulated</param> internal void Add(double metric) { _statistic.Add(metric); }
public void Add(double x) { Sum += x; _statistics.Add(x); }