commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean Noel Delavalade (JIRA)" <>
Subject [jira] [Created] (MATH-1283) Gamma function computation
Date Thu, 22 Oct 2015 08:40:27 GMT
Jean Noel Delavalade created MATH-1283:

             Summary: Gamma function computation
                 Key: MATH-1283
             Project: Commons Math
          Issue Type: Bug
    Affects Versions: 3.5, 4.0
         Environment: All
            Reporter: Jean Noel Delavalade
            Priority: Minor

In the gamma method, when handling the case "absX > 20", the computation of gammaAbs should
replace "x" (see code below with x in bold) by "absX".
For large negative values of x, the function returns with the wrong sign.

final double gammaAbs = SQRT_TWO_PI / *x* *
                                     FastMath.pow(y, absX + 0.5) *
                                     FastMath.exp(-y) * lanczos(absX);

This message was sent by Atlassian JIRA

View raw message