Uploaded image for project: 'Commons Numbers'
  1. Commons Numbers
  2. NUMBERS-153

Gamma.digamma() and Gamma.trigamma() throw stack overflow exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Implemented
    • 1.0-beta1
    • 1.0
    • gamma
    • None

    Description

      java.lang.StackOverflowError is thrown in

        double x = -10_000;
        double ans1 = Gamma.digamma(x);  // stack overflow
        double ans2 = Gamma.trigamma(x); // stack overflow

      It would be nice if the methods returned NaN / Infinity, rather than abort calculations (due to recursion gone wild).

      Please see the initial report in Commons Math3:

      https://issues.apache.org/jira/browse/MATH-1561

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              golova Dmitriy V. Golovashkin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: