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

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

[Octave-bug-tracker] [bug #60539] Slow performance of betaincinv.m


From: Michael Leitner
Subject: [Octave-bug-tracker] [bug #60539] Slow performance of betaincinv.m
Date: Fri, 7 May 2021 13:20:20 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #4, bug #60539 (project octave):

Initially your fix for x<0 and x>1 was not there. I think the purpose of the
bisection was to give a quite good starting point for the Newton iteration, so
that it in most cases it converged and did not go beyond the possible range.
Now, with the fix, I agree that it should not be necessary any more.

On another note: Yes, a small F' can be a problem. Specifically, if alpha and
beta are both larger than 1, then F' is zero at both 0 and 1. If during the
Newton iteration at any point x should become smaller than zero, your fix
would set it to eps, the derivative would be practically zero, it would
perform a practically infinite step in the positive direction, your other fix
sets it to 1-eps, the derivative is again practically zero, and you again go
into the negative range. In this case the Newton iteration would never
converge, which we have to prevent. That's why I suggested to start at the
inflection point, and you are guaranteed to monotonously converge outwards
towards the solution (and wouldn't even need the fix). 

If either alpha or beta (or both) are smaller than 1, then I would say yes,
start at 0.5 with Newton's method, with a meaningful stopping criterion. I see
no reason why bisection would be needed at all.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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