commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1336915 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/PascalDistribution.java
Date Thu, 10 May 2012 21:53:44 GMT
Author: tn
Date: Thu May 10 21:53:43 2012
New Revision: 1336915

URL: http://svn.apache.org/viewvc?rev=1336915&view=rev
Log:
[MATH-718] fixed integer overflow problem identified as part of numerical stability problems
with distributions.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/PascalDistribution.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/PascalDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/PascalDistribution.java?rev=1336915&r1=1336914&r2=1336915&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/PascalDistribution.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/PascalDistribution.java
Thu May 10 21:53:43 2012
@@ -130,7 +130,7 @@ public class PascalDistribution extends 
             ret = 0.0;
         } else {
             ret = Beta.regularizedBeta(probabilityOfSuccess,
-                    numberOfSuccesses, x + 1);
+                    numberOfSuccesses, x + 1.0);
         }
         return ret;
     }



Mime
View raw message