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

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

commit 70a25eee5fa7a297376d0810296647cc7ad4d26e
Author: XenoAmess <xenoam...@gmail.com>
AuthorDate: Sun Jun 7 19:04:53 2020 +0800

    MATH-1545: Follow best practice when checking ordering.
    
    Closes #152.
---
 .../org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
 
b/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
index 52e28ab..4a670cb 100644
--- 
a/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
+++ 
b/src/main/java/org/apache/commons/math4/stat/inference/KolmogorovSmirnovTest.java
@@ -739,7 +739,7 @@ public class KolmogorovSmirnovTest {
          * [1] states: "For 1/2 < h < 1 the bottom left element of the matrix 
should be (1 - 2*h^m +
          * (2h - 1)^m )/m!" Since 0 <= h < 1, then if h > 1/2 is sufficient to 
check:
          */
-        if (h.compareTo(ONE_HALF) == 1) {
+        if (h.compareTo(ONE_HALF) > 0) {
             Hdata.set(m - 1, 0,
                       Hdata.get(m - 1, 
0).add(h.multiply(2).subtract(1).pow(m)));
         }

Reply via email to