From 253c8a06ab5a42f056e193c1002b9c34ad56f8de Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Fri, 22 Oct 2021 11:53:05 +0000 Subject: get some T.DIST tests to work git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894473 13f79535-47bb-0310-9956-ffa450edef68 --- poi/src/main/java/org/apache/poi/ss/formula/functions/TDist.java | 2 +- poi/src/main/java/org/apache/poi/ss/formula/functions/TDistLt.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'poi') diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/TDist.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/TDist.java index 3d3b034e9f..87888e8547 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/TDist.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/TDist.java @@ -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); } diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/TDistLt.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/TDistLt.java index 4d8adcd99e..6cad57f864 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/TDistLt.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/TDistLt.java @@ -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); } -- cgit v1.2.3