You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2023/03/21 17:15:08 UTC

[commons-statistics] branch master updated: Lower test tolerances

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-statistics.git


The following commit(s) were added to refs/heads/master by this push:
     new 85cdb9f  Lower test tolerances
85cdb9f is described below

commit 85cdb9fc476c2e664905c7a52bc009ab6ab82f1a
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Tue Mar 21 17:10:52 2023 +0000

    Lower test tolerances
    
    Build failed on MacOS using temurin 11.0.18.
---
 .../statistics/distribution/test.binomial.4.properties   |  5 +++++
 .../statistics/distribution/test.zipf.2.properties       |  3 ++-
 .../org/apache/commons/statistics/inference/DDTest.java  |  4 ++--
 .../inference/KolmogorovSmirnovDistributionTest.java     | 16 ++++++++--------
 4 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/test.binomial.4.properties b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/test.binomial.4.properties
index e459342..1dd2fee 100644
--- a/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/test.binomial.4.properties
+++ b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/test.binomial.4.properties
@@ -52,3 +52,8 @@ isf.points = \
   1, 0.999, 0.990, 0.975, 0.950, 0.900,\
   0.001, 0.010, 0.025, 0.050, 0.100, 0
 isf.values = 0, 0, 0, 0, 1, 1, 8, 7, 6, 5, 5, 10
+
+# Overridden tolerances
+cdf.relative = 1e-15
+pmf.relative = 2e-15
+sf.relative = 1.1e-15
diff --git a/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/test.zipf.2.properties b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/test.zipf.2.properties
index d5aba70..8d8c09c 100644
--- a/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/test.zipf.2.properties
+++ b/commons-statistics-distribution/src/test/resources/org/apache/commons/statistics/distribution/test.zipf.2.properties
@@ -40,4 +40,5 @@ pmf.values = \
   0.0055625429756955835, 0.005150611429735321
 
 # Overridden tolerances
-sf.relative = 5e-14
+outside.support.relative = 4e-14
+sf.relative = 5.5e-14
diff --git a/commons-statistics-inference/src/test/java/org/apache/commons/statistics/inference/DDTest.java b/commons-statistics-inference/src/test/java/org/apache/commons/statistics/inference/DDTest.java
index 0e221ff..fb6f6da 100644
--- a/commons-statistics-inference/src/test/java/org/apache/commons/statistics/inference/DDTest.java
+++ b/commons-statistics-inference/src/test/java/org/apache/commons/statistics/inference/DDTest.java
@@ -1482,13 +1482,13 @@ class DDTest {
         // powScaled       loses ~ 1-bit from a double-double.
         builder.add(Arguments.of(1.402774996679172, 4.203934137477261E-17, 58162209, 28399655, "0.5069511623667528687158515355802548", 0x1.0p-39, 0x1.0p-80));
         builder.add(Arguments.of(1.4024304626662112, -1.4084179645855846E-17, 55066019, 26868321, "0.8324073012126417513056910315887745", 0x1.0p-39, 0x1.0p-80));
-        builder.add(Arguments.of(1.4125582593027008, -3.545476880711939E-17, 50869441, 25348771, "0.5062665858255789519032946906819150", 0x1.0p-39, 0x1.0p-80));
+        builder.add(Arguments.of(1.4125582593027008, -3.545476880711939E-17, 50869441, 25348771, "0.5062665858255789519032946906819150", 0x1.0p-38, 0x1.0p-80));
         builder.add(Arguments.of(1.4119649130236207, -6.64913621578422E-17, 57868054, 28801176, "0.8386830789932243373181320367289536", 0x1.0p-41, 0x1.0p-80));
         builder.add(Arguments.of(1.4138979166089836, 1.9810424188649008E-17, 57796577, 28879676, "0.8521759805456274150644862351758441", 0x1.0p-39, 0x1.0p-80));
         builder.add(Arguments.of(1.4145051107021165, 6.919285583856237E-17, -58047003, -29040764, "0.9609529369187483264098384290609811", 0x1.0p-39, 0x1.0p-80));
         builder.add(Arguments.of(1.4146512942500389, 5.809007274041755E-17, -52177565, -26112078, "0.6333625587966193592039026704846324", 0x1.0p-39, 0x1.0p-80));
         builder.add(Arguments.of(1.4145748596525067, -1.7347735766459908E-17, -58513216, -29278171, "0.6273407549603278011188148414634989", 0x1.0p-39, 0x1.0p-80));
-        builder.add(Arguments.of(1.4120799563428865, -5.594285001190042E-17, -52544350, -26157721, "0.5406504832406102336189856859270558", 0x1.0p-39, 0x1.0p-80));
+        builder.add(Arguments.of(1.4120799563428865, -5.594285001190042E-17, -52544350, -26157721, "0.5406504832406102336189856859270558", 0x1.0p-38, 0x1.0p-80));
         builder.add(Arguments.of(1.4092258370859025, -8.549761437095368E-17, -51083370, -25281304, "0.7447168954354128135078570760787011", 0x1.0p-39, 0x1.0p-80));
         return builder.build();
     }
diff --git a/commons-statistics-inference/src/test/java/org/apache/commons/statistics/inference/KolmogorovSmirnovDistributionTest.java b/commons-statistics-inference/src/test/java/org/apache/commons/statistics/inference/KolmogorovSmirnovDistributionTest.java
index 7ccb31c..f75f5c5 100644
--- a/commons-statistics-inference/src/test/java/org/apache/commons/statistics/inference/KolmogorovSmirnovDistributionTest.java
+++ b/commons-statistics-inference/src/test/java/org/apache/commons/statistics/inference/KolmogorovSmirnovDistributionTest.java
@@ -763,7 +763,7 @@ class KolmogorovSmirnovDistributionTest {
         "0.8080808080808081, 0.5310526193469937, 3e-16",
         "0.8585858585858586, 0.45236990476511224, 5e-16",
         "0.9090909090909091, 0.3803016446753137, 0",
-        "0.9595959595959596, 0.3158476576930847, 0",
+        "0.9595959595959596, 0.3158476576930847, 3e-16",
         "1.0101010101010102, 0.2593290139179131, 0",
         "1.0606060606060606, 0.2105998042008422, 0",
         "1.1111111111111112, 0.16921324662940662, 0",
@@ -772,7 +772,7 @@ class KolmogorovSmirnovDistributionTest {
         "1.2626262626262625, 0.0824656779812758, 0",
         "1.3131313131313131, 0.06357641976599795, 0",
         "1.3636363636363635, 0.048515334358901395, 0",
-        "1.4141414141414141, 0.03664600540696065, 0",
+        "1.4141414141414141, 0.03664600540696065, 3e-16",
         "1.4646464646464645, 0.027399406580958276, 0",
         "1.5151515151515151, 0.020277931764730677, 0",
         "1.5656565656565655, 0.014855068001826222, 0",
@@ -788,18 +788,18 @@ class KolmogorovSmirnovDistributionTest {
         "2.0707070707070705, 0.00037728549920393333, 0",
         "2.121212121212121, 0.00024704636020855906, 0",
         "2.1717171717171717, 0.0001601237238799859, 0",
-        "2.2222222222222223, 0.00010273106237950482, 0",
+        "2.2222222222222223, 0.00010273106237950482, 3e-16",
         "2.2727272727272725, 6.524042069332053e-05, 0",
         "2.323232323232323, 4.101102295378547e-05, 0",
         "2.3737373737373737, 2.551839333925589e-05, 0",
         "2.4242424242424243, 1.571719090670116e-05, 0",
         "2.474747474747475, 9.582203835505282e-06, 0",
         "2.525252525252525, 5.782621380645785e-06, 0",
-        "2.5757575757575757, 3.4542437941846216e-06, 0",
+        "2.5757575757575757, 3.4542437941846216e-06, 3e-16",
         "2.6262626262626263, 2.0424436820343616e-06, 0",
         "2.676767676767677, 1.1954077585773137e-06, 0",
         "2.727272727272727, 6.925496689847333e-07, 0",
-        "2.7777777777777777, 3.9715008300241957e-07, 0",
+        "2.7777777777777777, 3.9715008300241957e-07, 3e-16",
         "2.8282828282828283, 2.254380738121127e-07, 0",
         "2.878787878787879, 1.2666853518376852e-07, 0",
         "2.929292929292929, 7.044969339878468e-08, 0",
@@ -816,7 +816,7 @@ class KolmogorovSmirnovDistributionTest {
         "3.484848484848485, 5.658989138309737e-11, 0",
         "3.5353535353535355, 2.7846827793907893e-11, 0",
         "3.5858585858585856, 1.3563803007031639e-11, 0",
-        "3.6363636363636362, 6.539673919045773e-12, 0",
+        "3.6363636363636362, 6.539673919045773e-12, 3e-16",
         "3.686868686868687, 3.121041836580626e-12, 0",
         "3.7373737373737375, 1.4743885933384083e-12, 0",
         "3.7878787878787876, 6.894348142441467e-13, 0",
@@ -836,10 +836,10 @@ class KolmogorovSmirnovDistributionTest {
         "4.494949494949495, 5.643683358858976e-18, 0",
         "4.545454545454545, 2.264524503951638e-18, 0",
         "4.595959595959596, 8.994153292453066e-19, 0",
-        "4.646464646464646, 3.536001347144667e-19, 0",
+        "4.646464646464646, 3.536001347144667e-19, 3e-16",
         "4.696969696969697, 1.376047527079819e-19, 0",
         "4.747474747474747, 5.300579131166869e-20, 0",
-        "4.797979797979798, 2.0210734007684716e-20, 0",
+        "4.797979797979798, 2.0210734007684716e-20, 3e-16",
         "4.848484848484849, 7.627983170533337e-21, 0",
         "4.898989898989899, 2.8497465845482713e-21, 0",
         "4.94949494949495, 1.0538326098079213e-21, 0",