You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jean Noel Delavalade (JIRA)" <ji...@apache.org> on 2015/10/22 10:40:27 UTC
[jira] [Created] (MATH-1283) Gamma function computation
Jean Noel Delavalade created MATH-1283:
------------------------------------------
Summary: Gamma function computation
Key: MATH-1283
URL: https://issues.apache.org/jira/browse/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
(v6.3.4#6332)