Post Reply 
New Root-Seeking Algorithms
04-04-2017, 01:13 PM (This post was last modified: 04-04-2017 01:17 PM by Namir.)
Post: #12
RE: New Root-Seeking Algorithms
(04-04-2017 08:43 AM)emece67 Wrote:  Thanks again, Namir, for your work.

As you know, I'm quite parcial about the Ostrowsky method. When I read your paper I was surprised by its mediocre performance. Thus, I decided to check what was the problem with it.

In your code, the derivative is approximated as the ratio of two increments, but the constant you use (0.01 in the computation of h as h = 0.01 * (1 + Abs(X))) is way high for the Ostroswky method, you need a much smaller one.

Changing to h = 3.0e-7 * (1 + Abs(X)) (a nice value if the floats are 64 bits, as I think they are in VB), you will see (*) that the Ostrowsky method numbers in the tables turn red in all test cases except 2: Custom1 (but it no longer fails, it's now 17-53, same iterations but 2 more function evaluations than your hyper-secant method) and equation 6 with x0 = 1 (it's now 15-45, second behind Halley).

Perhaps the other methods in this comparison may also benefit from such change in the computation of h.

Your approach in the Hyper-Secant method looks really interesting for me.

Regards.

(*) I've performed such computations in Python with a precision of 15 digits, In VB the results may be different. In any case, my Python code returned the very same results (for number of iterations and total function calls) for all test cases in your table, so I am confident about my statement about the change in the computation of h. Also, the Python code does some sanity checks (as to not to divide by 0 and so on) anticipating problems such the derivative going to 0. I'm not sure at all if the VB code may have problems of such kind when the constant is changed.

Cesar,

Thank you so much for your comments. I use h=0.01 *(1+|x|) in fear that much smaller values would cause computational errors. By this I mean the accuracy of vintage calculators may give a slope of zero if h is way too small. Obviously I am wrong. I think replacing 0.01 with smaller value for all the methods should be interesting.

I think I am going to compare how reducing 0.01 repeatedly by a factor of 10 affect the iterations of at least the Newton method (maybe include Halley and Ostrowski too) and see how it affects the number of iterations and number of functions needed to reach a refined guess for the root, for a given tolerance value.

Namir
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
New Root-Seeking Algorithms - Namir - 04-02-2017, 09:28 PM
RE: New Root-Seeking Algorithms - pier4r - 04-02-2017, 09:54 PM
RE: New Root-Seeking Algorithms - Namir - 04-02-2017, 11:12 PM
RE: New Root-Seeking Algorithms - Namir - 04-02-2017, 11:15 PM
RE: New Root-Seeking Algorithms - bshoring - 04-03-2017, 09:23 PM
RE: New Root-Seeking Algorithms - Namir - 04-04-2017, 10:11 AM
RE: New Root-Seeking Algorithms - emece67 - 04-04-2017, 08:43 AM
RE: New Root-Seeking Algorithms - Namir - 04-04-2017 01:13 PM
RE: New Root-Seeking Algorithms - ttw - 04-04-2017, 09:22 AM
RE: New Root-Seeking Algorithms - pier4r - 04-04-2017, 09:33 AM
RE: New Root-Seeking Algorithms - Namir - 04-04-2017, 10:14 AM
RE: New Root-Seeking Algorithms - ttw - 04-04-2017, 02:20 PM
RE: New Root-Seeking Algorithms - emece67 - 04-04-2017, 02:39 PM
RE: New Root-Seeking Algorithms - Namir - 04-05-2017, 10:00 PM
RE: New Root-Seeking Algorithms - ttw - 04-06-2017, 01:51 AM
RE: New Root-Seeking Algorithms - Namir - 04-06-2017, 03:17 AM
RE: New Root-Seeking Algorithms - DMaier - 04-06-2017, 05:11 AM
RE: New Root-Seeking Algorithms - Namir - 04-06-2017, 09:05 AM
RE: New Root-Seeking Algorithms - ttw - 04-09-2017, 09:33 PM
RE: New Root-Seeking Algorithms - Namir - 04-10-2017, 05:01 AM
RE: New Root-Seeking Algorithms - Namir - 04-13-2017, 01:23 PM
RE: New Root-Seeking Algorithms - Namir - 04-15-2017, 10:58 PM
RE: New Root-Seeking Algorithms - robve - 11-25-2020, 09:44 PM
RE: New Root-Seeking Algorithms - Namir - 04-16-2017, 01:06 PM
RE: New Root-Seeking Algorithms - ttw - 04-20-2017, 05:05 AM



User(s) browsing this thread: 1 Guest(s)