HP50G Bisection methode
|
10-04-2020, 03:04 PM
Post: #7
|
|||
|
|||
RE: HP50G Bisection methode
(10-03-2020 02:03 AM)Albert Chan Wrote: >>> f = lambda x: x**5 - 5 For ε=1e-15, solve_bisect() required log2(1/ε) ≈ 50 bisects (assuming it did not hit the root head on). I just learned Ridder's method. It has the advantage of bisection (guaranteed convergence), worst-case convergence of bisection. But, if function is well behaved, each loop approximately doubled convergence. (since it take 2 function calls to do 1 loop, convergence is √2 order) All code before getting (c, fc) is the same as solve_bisect(), then we add point (d, fd): Code: def solve_ridder(f,a,b, eps=1e-8, verbal=True): >>> f = lambda x: x**5 - 5 >>> solve_ridder(f, 1,2, eps=1e-15) 1 2 1.3789222674 1.5 1.37972953756 1.4394611337 1.37972966146 1.40959533563 1.37972966146 1.37972966146 1.37972966146 1.37972966146 1.3797296614612149 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP50G Bisection methode - tigger - 07-24-2015, 12:01 PM
RE: HP50G Bisection methode - Gilles - 07-24-2015, 04:35 PM
RE: HP50G Bisection methode - Namir - 07-29-2015, 11:37 AM
RE: HP50G Bisection methode - Namir - 07-29-2015, 11:31 AM
RE: HP50G Bisection methode - acser - 10-02-2020, 11:30 PM
RE: HP50G Bisection methode - Albert Chan - 10-03-2020, 02:03 AM
RE: HP50G Bisection methode - Albert Chan - 10-04-2020 03:04 PM
RE: HP50G Bisection methode - acser - 10-07-2020, 09:15 PM
RE: HP50G Bisection methode - John Keith - 10-08-2020, 11:55 AM
RE: HP50G Bisection methode - acser - 10-08-2020, 12:55 PM
|
User(s) browsing this thread: 2 Guest(s)