[ 
https://issues.apache.org/jira/browse/MATH-1274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14746386#comment-14746386
 ] 

Phil Steitz commented on MATH-1274:
-----------------------------------

+1 for this change.  Definitely an improvement.  It might be better to change 
the names of the private methods from discreteXxx to longXxx or integralXxx.  
The stats are already discrete - the change is to recode them as integral :) 

> Represent Kolmogorov-Smirnov statistic as long value
> ----------------------------------------------------
>
>                 Key: MATH-1274
>                 URL: https://issues.apache.org/jira/browse/MATH-1274
>             Project: Commons Math
>          Issue Type: Improvement
>            Reporter: Otmar Ertl
>         Attachments: MATH-1274.patch
>
>
> In KolmogorovSmirnovTest.java the 2-sample Kolmogorov-Smirnov statistic is 
> internally represented as double value. However, the KS-statistic can be 
> accurately represented as long value if multiplied by both sample sizes. This 
> approach saves some floating point operations and avoids difficulties when 
> comparing two KS-statistics. Currently, Precision.compareTo with some 
> tolerance must be used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to