Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-309

nextExponential parameter check bug - patch supplied

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0, 1.1, 1.2, 2.0
    • Fix Version/s: 2.1
    • Labels:
      None
    • Environment:

      Ubuntu 9.04

      Description

      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)
        Unknown macro: { throw MathRuntimeException.createIllegalArgumentException( "mean must be positive ({0})", mean); }

        Attachments

        1. patch_random_exp
          0.6 kB
          Mikkel Meyer Andersen

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikl Mikkel Meyer Andersen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified