Post Reply 
Small Solver Program
02-25-2019, 08:39 PM
Post: #24
RE: Small Solver Program
(02-20-2019 05:31 AM)Thomas Klemm Wrote:  Or if we start with two points whose function values have opposite signs and then evaluate the function at the midpoint.
Based on its sign the next step is just a jump to the left or a jump to the right.
Bang: we've just invented binary search.

Not really, because in my idea no needed to bracket the root. The algorithm identifies the right direction, then make one step in that direction. When the sign is changed, the direction changes and the stepsize is reduced. Repeat until the stepsize is small enough (when the sign is changed).

First I wrote in similar way an extremum finder for CASIO fx-4000P, later reduced the length and coded on fx-3650P (see the attachment: variables: A: stop condition, the minimal stepsize, B: function previous value, C: step direction: +1/-1, D(>0!) actual stepsize, X: actual x, Y: actual y, M: subroutine return address, the function: 150×9.81×0.48/(cos(x)+0.48×sin(x)) ).

And of course, later I found totally same - implemented on a HP-9100:





I have never learned computer science, maybe my methods are documented and invented many years before, and of course, it is possible to upgrade them (or available more effective), but my goal is find a workable simplest method which can be coded immediately.

Csaba


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Small Solver Program - Gamo - 02-14-2019, 05:25 AM
RE: Small Solver Program - Thomas Klemm - 02-14-2019, 07:06 AM
RE: Small Solver Program - Albert Chan - 02-15-2019, 12:07 AM
RE: Small Solver Program - Thomas Klemm - 02-15-2019, 06:26 PM
RE: Small Solver Program - Albert Chan - 02-15-2019, 09:16 PM
RE: Small Solver Program - Thomas Klemm - 02-16-2019, 03:58 AM
RE: Small Solver Program - Albert Chan - 11-03-2019, 03:14 PM
RE: Small Solver Program - Albert Chan - 11-10-2019, 07:02 PM
RE: Small Solver Program - Albert Chan - 12-01-2019, 12:13 AM
RE: Small Solver Program - Csaba Tizedes - 02-16-2019, 12:24 PM
RE: Small Solver Program - Thomas Klemm - 02-16-2019, 01:42 PM
RE: Small Solver Program - Csaba Tizedes - 02-16-2019, 03:24 PM
RE: Small Solver Program - Gamo - 02-17-2019, 02:57 AM
RE: Small Solver Program - Thomas Klemm - 02-17-2019, 09:06 AM
RE: Small Solver Program - Gamo - 02-17-2019, 02:33 PM
RE: Small Solver Program - Thomas Klemm - 02-17-2019, 04:57 PM
RE: Small Solver Program - Gamo - 02-18-2019, 03:49 AM
RE: Small Solver Program - Thomas Klemm - 02-18-2019, 05:20 AM
RE: Small Solver Program - Dieter - 02-18-2019, 07:46 PM
RE: Small Solver Program - Thomas Klemm - 02-18-2019, 10:22 PM
RE: Small Solver Program - Albert Chan - 02-19-2019, 01:10 AM
RE: Small Solver Program - Csaba Tizedes - 02-19-2019, 08:39 AM
RE: Small Solver Program - Thomas Klemm - 02-20-2019, 05:31 AM
RE: Small Solver Program - Csaba Tizedes - 02-25-2019 08:39 PM
RE: Small Solver Program - Thomas Klemm - 02-20-2019, 07:22 AM
RE: Small Solver Program - Thomas Klemm - 02-24-2019, 09:21 AM
RE: Small Solver Program - Thomas Klemm - 02-25-2019, 11:00 PM
RE: Small Solver Program - Albert Chan - 01-04-2020, 07:49 PM



User(s) browsing this thread: