TDistribution extends AbstractRealDistribution { public double cumulativeProbability(double x) { double ret; if (x == 0) { ret = 0.5; } else { double t = Beta.regularizedBeta( degreesOfFreedom / (degreesOfFreedom + (x * x)), 0.5 * degreesOfFreedom, 0.5); if (x < 0.0) { ret = 0.5 * t; } else { ret = 1.0 - 0.5 * t; } } return ret; } TDistribution(double degreesOfFreedom);  TDistribution(double degreesOfFreedom, double inverseCumAccuracy);  TDistribution(RandomGenerator rng, double degreesOfFreedom);  TDistribution(RandomGenerator rng,
                         double degreesOfFreedom,
                         double inverseCumAccuracy); double getDegreesOfFreedom(); double density(double x); @Override double logDensity(double x); double cumulativeProbability(double x); double getNumericalMean(); double getNumericalVariance(); double getSupportLowerBound(); double getSupportUpperBound(); boolean isSupportLowerBoundInclusive(); boolean isSupportUpperBoundInclusive(); boolean isSupportConnected(); static final double DEFAULT_INVERSE_ABSOLUTE_ACCURACY; }
@Test public void testCumulativeProbabilityAgainstStackOverflow() { TDistribution td = new TDistribution(5.); td.cumulativeProbability(.1); td.cumulativeProbability(.01); }