help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gammainc, no small outputs


From: Anderson M. Winkler
Subject: Re: gammainc, no small outputs
Date: Fri, 29 Apr 2016 17:39:29 +0100

oops, a line can be changed to increase speed slightly... 


On 29 April 2016 at 17:33, Anderson M. Winkler <address@hidden> wrote:
In case anyone else has the same problem and finds this thread, attached I send a quick-and-dirty patch that attempts to fix the issue until gammainc is updated. It's of course much slower, and requires that A (the 2nd argument) is a scalar.


On 28 April 2016 at 19:18, Anderson M. Winkler <address@hidden> wrote:
Thank you for the feedback. Have just filed a bug.
Anderson


On 28 April 2016 at 18:52, Mike Miller <address@hidden> wrote:
On Thu, Apr 28, 2016 at 16:00:23 +0100, Anderson M. Winkler wrote:
> Dear all,
>
> Consider this:
>
> *Matlab: *
>
> >> gammainc(60,6,'upper')
> ans =
>    6.1802e-20
>
>
> *Octave 4.0.0 (same for 3.8.2):*
>
> >> gammainc(60,6,'upper')
> ans = 0
>
>
> This is causing large problems, as norminv(6.1802e-20) = -9.0659 (the
> expected result), whereas norminv(0) = -Inf, and subsequent code crashes.
>
> Could this be fixed to allow outputs smaller than about 1e-16? Thanks.

Possibly, it would take a developer who understands the function and the
motivation to make it better for these kinds of corner cases. If you can
improve the function, please contribute some changes.

  http://hg.savannah.gnu.org/hgweb/octave/file/@/liboctave/cruft/slatec-fn/xgmainc.f

Either way, you should probably file a bug report if you want something
to happen,

  https://savannah.gnu.org/bugs/?func=additem&group=octave

--
mike



Attachment: gammainc2.m
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]