You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Dmitriy V. Golovashkin (Jira)" <ji...@apache.org> on 2020/10/29 19:41:00 UTC
[jira] [Commented] (NUMBERS-153) Gamma.digamma() and
Gamma.trigamma() throw stack overflow exception
[ https://issues.apache.org/jira/browse/NUMBERS-153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17223173#comment-17223173 ]
Dmitriy V. Golovashkin commented on NUMBERS-153:
------------------------------------------------
A potential nonrecursive solution for digamma:
https://stackoverflow.com/questions/16258810/how-to-rewrite-the-digamma-function-to-nonrecursive
> Gamma.digamma() and Gamma.trigamma() throw stack overflow exception
> -------------------------------------------------------------------
>
> Key: NUMBERS-153
> URL: https://issues.apache.org/jira/browse/NUMBERS-153
> Project: Commons Numbers
> Issue Type: Bug
> Components: gamma
> Affects Versions: 1.0-beta1
> Reporter: Dmitriy V. Golovashkin
> Priority: Major
> Fix For: 1.0
>
>
> {color:#0033b3}java.lang.StackOverflowError is thrown in{color}
> {code:java}
> double x = -10_000;
> double ans1 = Gamma.digamma(x); // stack overflow
> double ans2 = Gamma.trigamma(x); // stack overflow{code}
> 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
--
This message was sent by Atlassian Jira
(v8.3.4#803005)