You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles (Jira)" <ji...@apache.org> on 2019/09/02 10:55:00 UTC

[jira] [Resolved] (MATH-1496) An error in Gamma.java

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

Gilles resolved MATH-1496.
--------------------------
    Resolution: Won't Fix

Class does not exist anymore in the development version (4.0-SNAPSHOT) of Commons Math.
Fix was applied in the replacement code that is now in the Commons Numbers project (see previous comment).

> An error in Gamma.java
> ----------------------
>
>                 Key: MATH-1496
>                 URL: https://issues.apache.org/jira/browse/MATH-1496
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.6.1
>            Reporter: Xi Chen
>            Priority: Major
>
> {noformat}
> if (x >= C_LIMIT) {
>       // use method 4 (accurate to O(1/x^8)
>       double inv = 1 / (x * x);
>       // ...
>       return FastMath.log(x) - 0.5 / x - inv * ((1.0 / 12) + inv * (1.0 / 120 - inv / 252));
> }
> {noformat}
> Line 463:
> {code}
>  return FastMath.log(x) - 0.5 / x - inv * ((1.0 / 12) + inv * (1.0 / 120 - inv / 252));
> {code}
> Is it should be:
> {code}
>  return FastMath.log(x) - 0.5 / x - inv * ((1.0 / 12) - inv * (1.0 / 120 - inv / 252));
> {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)