I wrote an article on something to be aware of if you use the HP solver and expect the direct solver to be used, but instead the iterative solver is used.
Iterative vs. direct solver


« Next Oldest  Next Newest »

▼
05172012, 08:42 PM
▼
05172012, 09:17 PM
Hi Don, Good article. Thanks for posting it. Yoou are deffinitely the solver king. Bill ▼
05172012, 09:39 PM
Thanks Bill. I'm no king, but I do enjoy using the solver to take advantage of its many capabilities. Years ago, you first turned me onto the "bible" for all things solver, the Technical Applications Manual for the 27s/19b. In fact, at the top of page 14 it discusses what I reported in my article, about the direct solver failing if the variable you are solving for appears more than once formally, and also how to change the reference to the variable so the direct solver will work. Fascinating stuff. I sure hope the guys who designed that solver got some kind of award/reward for it, they sure deserved it.
05182012, 03:42 AM
The Solver King is Professor Kahan. The King of iterative solution for nonlinear equations ... is .... uhum ... yours truly! It has been a passion and (dare I say obsession) of mine since the mid 70s!! Namir PS: In fact in the last few months I have been studying the methods for iterative solution of linear systems. The topic is fascinating. The stationary methods are interesting but come with limitations as to what kind of (large) linear systems they can solve. The nonstationary method use conjugate gradient methods to solve the linear systems as an optimization problem. I have been tinkering with the algorithms to solve sets of 500, 1000, and 2000 linear equations. So far, no new discovery :(
PS2: My lack of modesty is due to jet lag effects, having returned from Europe a few days ago!! Edited: 18 May 2012, 3:57 a.m. after one or more responses were posted ▼
05182012, 03:47 AM
Care to write a nonlinear iterative solver for the 34S :)  Pauli ▼
05182012, 03:56 AM
Is the current solver for the 34S inadequate???!!! Namir ▼
05182012, 03:59 AM
I'm not sure, but I am sure it can be improved :)  Pauli ▼
05182012, 04:44 AM
Pauli, I can certainly look at the pseudocode for your solver and see if I can improve it. Namir ▼
05182012, 04:59 AM
Namir, The source code is trunk/xrom/solve.wp34s on the subversion site. I use a combination of quadratic interpolation, Ridder's method, secant and bisection with lots of guards etc. It seems to work okay most of the time but it is the difficult problems that really show up this kind of code.
▼
05182012, 06:13 AM
Pauli, Do you monitor the sign of the updates in the guess for the root, to guard against the guess resonating between two different regions of values? Also do you check for low slope values? Sorry for asking questions that may be trivial to you. These are two general cases of rootseeking problems that come to mind. Namir ▼
05182012, 07:24 AM
Once the two estimates' signs are different I force all future guesses to be within the interval  I switch to bisection if the more sophicated methods give guesses outside this interval. I know that this will locate discontinuities that across zero but I can live with that. My previous solver used bisection if the split between the new guess and the current bounds was too small but I've stopped doing this  Ridder's steps seem more effective after a bisection. I'm not exactly sure what you mean by low slope values  I do limit the jump distance if both guesses have the same sign to ten times the width between the guesses. I also limit jumps when the function appears constant, although not much.
▼
05182012, 09:06 AM
The low slope (function derivative) value is a problem when using Newton's method. Other methods like Ridder and Bisection are not affected by the slope. Namir ▼
05182012, 06:28 PM
Until the solution is bracketed, I don't use Ridder's or bisection, only secant and quadratic interpolation. Once the solution is bracketed, there is no need to limit the distance jumped  only to keep future estimates inside the bracketed interval. I guess I could disable the limiting for quadratic interpolation. Is it a problem here too or not? My gut feeling is quadratic interpolation will be confused too, although not so badly as the secant method  gut feelings are notoriously fickle though.

Possibly Related Threads...  
Thread  Author  Replies  Views  Last Post  
hpprime solver and variable name  fabrice48  22  4,377 
12102013, 03:25 AM Last Post: fabrice48 

HP Prime Triangle solver  BruceH  29  4,653 
11282013, 12:03 AM Last Post: Dale Reed 

Using units in Numeric Solver  Harold A Climer  1  701 
10132013, 10:44 AM Last Post: Tim Wessman 

Does Prime Have a Multiple Equation Solver?  Norman Dziedzic  2  761 
09202013, 09:43 AM Last Post: Norman Dziedzic 

[HPPrime CAS] Automatic Simplification (Direct Answer)  CompSystems  6  1,248 
07262013, 07:20 PM Last Post: Gilles Carpentier 

Just a lazy solver algortihm  PGILLET  1  672 
06282013, 11:47 PM Last Post: Namir 

[43s] : How the solver will be implemented  Miguel Toro  3  951 
03142013, 06:09 PM Last Post: Walter B 

TVMSolver for the PC  fhub  14  2,381 
12262012, 03:24 PM Last Post: fhub 

[WP34s] New TVMsolver version  fhub  43  6,244 
12262012, 06:12 AM Last Post: fhub 

HPSolver  Mike (Stgt)  2  675 
10102012, 02:44 AM Last Post: Mike (Stgt) 