[jira] Created: (MATH-309) nextExponential parameter check bug - patch supplied

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (MATH-309) nextExponential parameter check bug - patch supplied

Richard (Jira)
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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (MATH-309) nextExponential parameter check bug - patch supplied

Richard (Jira)

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

Mikkel Meyer Andersen updated MATH-309:
---------------------------------------

    Attachment: patch_random_exp

> 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
>         Attachments: patch_random_exp
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (MATH-309) nextExponential parameter check bug - patch supplied

Richard (Jira)
In reply to this post by Richard (Jira)

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

Phil Steitz updated MATH-309:
-----------------------------

    Affects Version/s: 1.0
                       1.1
                       1.2
        Fix Version/s: 2.1

> 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: 1.0, 1.1, 1.2, 2.0
>         Environment: Ubuntu 9.04
>            Reporter: Mikkel Meyer Andersen
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: patch_random_exp
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (MATH-309) nextExponential parameter check bug - patch supplied

Richard (Jira)
In reply to this post by Richard (Jira)

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

Phil Steitz resolved MATH-309.
------------------------------

    Resolution: Fixed

Fixed in r831510.  Thanks for reporting this.

> 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: 1.0, 1.1, 1.2, 2.0
>         Environment: Ubuntu 9.04
>            Reporter: Mikkel Meyer Andersen
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: patch_random_exp
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (MATH-309) nextExponential parameter check bug - patch supplied

Richard (Jira)
In reply to this post by Richard (Jira)

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

Phil Steitz closed MATH-309.
----------------------------


> 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: 1.0, 1.1, 1.2, 2.0
>         Environment: Ubuntu 9.04
>            Reporter: Mikkel Meyer Andersen
>            Priority: Minor
>             Fix For: 2.1
>
>         Attachments: patch_random_exp
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> 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.