MATH-1545: Follow best practice when checking ordering.

Closes #152.
This commit is contained in:
XenoAmess 2020-06-07 19:04:53 +08:00 committed by Gilles Sadowski
parent 5b020dba27
commit 70a25eee5f
1 changed files with 1 additions and 1 deletions

View File

@ -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)));
}