Small Solver Program

02252019, 08:39 PM
Post: #24




RE: Small Solver Program
(02202019 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. 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 fx4000P, later reduced the length and coded on fx3650P (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 HP9100: 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 

« Next Oldest  Next Newest »

User(s) browsing this thread: