commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikkel Meyer Andersen (JIRA)" <j...@apache.org>
Subject [jira] Created: (MATH-309) nextExponential parameter check bug - patch supplied
Date Tue, 27 Oct 2009 13:20:59 GMT
nextExponential parameter check bug - patch supplied
----------------------------------------------------

                 Key: MATH-309
                 URL: https://issues.apache.org/jira/browse/MATH-309
             Project: Commons Math
          Issue Type: Bug
    Affects Versions: 2.0
         Environment: Ubuntu 9.04
            Reporter: Mikkel Meyer Andersen
            Priority: Minor


Index: src/main/java/org/apache/commons/math/random/RandomDataImpl.java
===================================================================
--- src/main/java/org/apache/commons/math/random/RandomDataImpl.java	(revision 830102)
+++ src/main/java/org/apache/commons/math/random/RandomDataImpl.java	(working copy)
@@ -462,7 +462,7 @@
      * @return the random Exponential value
      */
     public double nextExponential(double mean) {
-        if (mean < 0.0) {
+        if (mean <= 0.0) {
             throw MathRuntimeException.createIllegalArgumentException(
                   "mean must be positive ({0})", mean);
         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message