public void CauchyStudentAgreement() { StudentDistribution S = new StudentDistribution(1); CauchyDistribution C = new CauchyDistribution(); // don't compare moments directly, because NaN != NaN foreach (double P in probabilities) { double xS = S.InverseLeftProbability(P); double xC = C.InverseLeftProbability(P); Console.WriteLine("{0} {1} {2}", P, xS, xC); Assert.IsTrue(TestUtilities.IsNearlyEqual(xS, xC)); Assert.IsTrue(TestUtilities.IsNearlyEqual(S.ProbabilityDensity(xS), C.ProbabilityDensity(xC))); } }