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: Thu, 13 May 2021 16:13:26 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Firefox/60.0

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

I attach a modified version of betaincinv.m, where more (programmer's) effort
is put into generating a good initial point for the Newton iterations, which
should then converge quickly and monotonically, without any need for
bisection, and I modified the Newton subroutine itself so that it stops
whenever the step length is zero or reverses (which with the correct initial
points can only happen due to finite precision arithmetics). 

In my tests it is faster by about a factor of four. 

There are some things left to do: first, in the ifnottex block of the
function's definition the division by beta(a,b) is missing (this pertains also
to the documentation of betainc.m). Further, I do not see the reason why y, a
and b are tested for common size -- why aren't the rules of standard singleton
expansion followed here? 

(file #51431)
    _______________________________________________________

Additional Item Attachment:

File name: betaincinv.m                   Size:9 KB
    <https://file.savannah.gnu.org/file/betaincinv.m?file_id=51431>



    _______________________________________________________

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]