get some T.DIST tests to work

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894473 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2021-10-22 11:53:05 +00:00
parent 1b51dbca9f
commit 253c8a06ab
2 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ public final class TDist extends Fixed3ArgFunction implements FreeRefFunction {
public static final TDist instance = new TDist();
static double tdistOneTail(double x, int degreesOfFreedom) {
TDistribution tdist = new TDistribution(degreesOfFreedom);
TDistribution tdist = new TDistribution(null, degreesOfFreedom);
return 1.0 - tdist.cumulativeProbability(x);
}

View File

@ -51,12 +51,12 @@ public final class TDistLt extends Fixed3ArgFunction implements FreeRefFunction
public static final TDistLt instance = new TDistLt();
private static double tdistCumulative(double x, int degreesOfFreedom) {
TDistribution tdist = new TDistribution(degreesOfFreedom);
TDistribution tdist = new TDistribution(null, degreesOfFreedom);
return tdist.cumulativeProbability(x);
}
private static double tdistDensity(double x, int degreesOfFreedom) {
TDistribution tdist = new TDistribution(degreesOfFreedom);
TDistribution tdist = new TDistribution(null, degreesOfFreedom);
return tdist.density(x);
}