From: PJ Fanning Date: Wed, 26 Jan 2022 20:16:53 +0000 (+0000) Subject: increase precion in test X-Git-Tag: REL_5_2_1~140 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0c6bc4bd0b242757ba80d0b235d09e231d072cca;p=poi.git increase precion in test git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897517 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestNormDist.java b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestNormDist.java index 2468558b98..39ae606adf 100644 --- a/poi/src/test/java/org/apache/poi/ss/formula/functions/TestNormDist.java +++ b/poi/src/test/java/org/apache/poi/ss/formula/functions/TestNormDist.java @@ -45,8 +45,8 @@ final class TestNormDist { @Test void testBasic() { - confirmValue("42", "40", "1.5", true, 0.9087888); - confirmValue("42", "40", "1.5", false, 0.10934); + confirmValue("42", "40", "1.5", true, 0.908788780274132); + confirmValue("42", "40", "1.5", false, 0.109340049783996); } @Test @@ -74,8 +74,8 @@ final class TestNormDist { addRow(sheet, 3, 1.5, "Standard deviation of the distribution"); HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb); HSSFCell cell = wb.getSheetAt(0).getRow(0).createCell(100); - assertDouble(fe, cell, "NORMDIST(A2,A3,A4,TRUE)", 0.9087888, 0.000001); - assertDouble(fe, cell, "NORM.DIST(A2,A3,A4,TRUE)", 0.9087888, 0.000001); + assertDouble(fe, cell, "NORMDIST(A2,A3,A4,TRUE)", 0.908788780274132, 0.00000000000001); + assertDouble(fe, cell, "NORM.DIST(A2,A3,A4,TRUE)", 0.908788780274132, 0.00000000000001); } } @@ -87,7 +87,7 @@ final class TestNormDist { private static void confirmValue(String number1, String number2, String number3, boolean cumulative, double expected) { ValueEval result = invokeValue(number1, number2, number3, cumulative); assertEquals(NumberEval.class, result.getClass()); - assertEquals(expected, ((NumberEval) result).getNumberValue(), 0.0000001); + assertEquals(expected, ((NumberEval) result).getNumberValue(), 0.00000000000001); } private static void confirmInvalidError(String number1, String number2, String number3, boolean cumulative) {