]> source.dussan.org Git - poi.git/commitdiff
increase precion in test
authorPJ Fanning <fanningpj@apache.org>
Wed, 26 Jan 2022 20:16:53 +0000 (20:16 +0000)
committerPJ Fanning <fanningpj@apache.org>
Wed, 26 Jan 2022 20:16:53 +0000 (20:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897517 13f79535-47bb-0310-9956-ffa450edef68

poi/src/test/java/org/apache/poi/ss/formula/functions/TestNormDist.java

index 2468558b9875fa6f27529a3dd29dbb02caedc9d0..39ae606adf2de571d384d1ea1ab7273a1c7613b4 100644 (file)
@@ -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) {