[ 
https://issues.apache.org/jira/browse/MATH-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Neidhart resolved MATH-1145.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 3.4

Fixed in r1624756.

Changed the calculation to long as this should be sufficient and is already 
done like this in other places.

Thanks for the report and patch!

> Integer overflows MannWhitneyUTest#mannWhitneyU
> -----------------------------------------------
>
>                 Key: MATH-1145
>                 URL: https://issues.apache.org/jira/browse/MATH-1145
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.3, 3.4
>            Reporter: Anders Conbere
>             Fix For: 3.4
>
>
> In the calculation of MannWhitneyUTest#mannWhitneyU there are two instances 
> where the lengths of the input arrays are multiplied together. Because 
> Array#length is an integer this means that the effective maximum size of your 
> dataset until reaching overflow is Math.sqrt(Integer.MAX_VALUE).
> The following is a link to a diff, with a test the exposes the issue, and a 
> fix (casting lengths up into doubles before multiplying).
> https://gist.github.com/aconbere/4fef56e5182e510aceb3



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

Reply via email to