octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #60528] special function: betaincinv


From: Rik
Subject: [Octave-bug-tracker] [bug #60528] special function: betaincinv
Date: Wed, 5 May 2021 17:31:49 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36

Update of bug #60528 (project octave):

                  Status:                    None => Ready For Test         
        Operating System:       Microsoft Windows => Any                    

    _______________________________________________________

Follow-up Comment #1:

Confirmed.  The code in betaincinv uses a Newton's Method search.  As part of
that process intermediate guesses can fall below zero.  I fixed that in this
changeset http://hg.savannah.gnu.org/hgweb/octave/rev/26ba91f0eea7.

The code I used was


  x(x(todo) < 0) = eps;  # Avoid negative x in betainc() call, bug #60528


where I moved any intermediate guess that was negative to be just greater than
0.

Of course, that made me wonder if it was possible for intermediate values to
exceed 1.0 and that was also true.  So I had to add another line


  x(x(todo) > 1) = 1-eps;


See additional changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/69b6b783a8ab.

Marking as Ready for Test.  You can download the m-file from the Mercurial
repository and copy it over your existing betaincinv.m to see the changes.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60528>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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