public void ValidateCumulativeDistribution(int shape, double invScale, double x, double cdf) { var n = new Erlang(shape, invScale); AssertHelpers.AlmostEqual(cdf, n.CumulativeDistribution(x), 14); AssertHelpers.AlmostEqual(cdf, Erlang.CDF(shape, invScale, x), 14); }