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

nextExponential parameter check bug - patch supplied

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0, 1.1, 1.2, 2.0
    • 2.1
    • None
    • 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

            Unassigned Unassigned
            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