« Return to Thread: Bug in 3.0.1's betainc function (was Re: [OctDev] More than just an inconvenience Re: But in t_cdf: sporadic zero's when "no need")

Re: Bug in 3.0.1's betainc function (was Re: [OctDev] More than just an inconvenience Re: But in t_cdf: sporadic zero's when "no need")

by David Bateman-3 :: Rate this Message:

Reply to Author | View in Thread

Dave Goel wrote:

> I have looked up matlab (TM)'s answers at a friend's workstation:
>
>>> betainc (.75, 2047, .5)
>> 4.437e-258
>
> matlab: 4.437e-258
>
>>> betainc (.85, 2047, .5)
>> 0
>
> matlab: 1.0659e-146
>
>
>> ^^ If it returned a zero for .85, it should either do likewise for
>> .75, or it should return a better answer for .85.
>>
>>
>> ----
>
> ((Also, for x=3,
>
>> betainc (3,2047,.5)
>
> matlab rightly returns an error demanding that x be in the interval
> [0, 1]".  Octave does no such check, and returns with a convergence
> error in a numerical function.))

Then this is an issue with the underlying SLATEC function dbetai, the
only sensible way I see of fixing this is to replace it with the gsl
functions, and in that case lots of other functions in Octave should get
the same treatment.

D.

_______________________________________________
Bug-octave mailing list
Bug-octave@...
https://www.cae.wisc.edu/mailman/listinfo/bug-octave

 « Return to Thread: Bug in 3.0.1's betainc function (was Re: [OctDev] More than just an inconvenience Re: But in t_cdf: sporadic zero's when "no need")