You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2015/10/22 22:34:27 UTC

[jira] [Resolved] (MATH-1283) Gamma function computation

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

Thomas Neidhart resolved MATH-1283.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 3.6
                   4.0

Fixed in the following commits:

 * 3.6: 40f35da56
 * 4.0: 9e0c5ad4b

Thanks for the report and suggested fix!

> Gamma function computation
> --------------------------
>
>                 Key: MATH-1283
>                 URL: https://issues.apache.org/jira/browse/MATH-1283
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 4.0, 3.5
>         Environment: All
>            Reporter: Jean Noel Delavalade
>            Priority: Minor
>             Fix For: 4.0, 3.6
>
>
> 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
(v6.3.4#6332)