The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

WP34S solver
Message #1 Posted by Alessandro Castellani (Italy) on 15 Mar 2012, 1:52 p.m.

Hi,

I have some question about the WP34S V.3 solver:
- can I stop the solver on the real calculator if it takes too much time and how ?
- sometimes, the answer given by the solver is outside the initial domain I provided,
isn't more logic in this case that it returns a' solution not found ' message ?

Thanks.

      
Re: WP34S solver
Message #2 Posted by Walter B on 15 Mar 2012, 3:01 p.m.,
in response to message #1 by Alessandro Castellani (Italy)

Answer to your first question: R/S will stop it at any time. EXIT will do the same. See page 81 of the manual.

Question to your second question: I don't get what you mean by 'outside the initial domain I provided'. Please specify.

Edited: 15 Mar 2012, 3:27 p.m.

            
Re: WP34S solver
Message #3 Posted by Alessandro Castellani (Italy) on 15 Mar 2012, 6:07 p.m.,
in response to message #2 by Walter B

Quote:
Answer to your first question: R/S will stop it at any time. EXIT will do the same. See page 81 of the manual.

I admit that I haven't read carefully the manual but I remembered I've pressed EXIT and nothing is changed,
in this rarely cases calculator (v3 2641) seems frozen and I have to reset it.

Quote:
Question to your second question: I don't get what you mean by 'outside the initial domain I provided'. Please specify.

Marcus has already responded to my answer: I wrongly thought the the solver algorithm utilized the two initial estimates as
limits for the possible solutions.

                  
Re: WP34S solver
Message #4 Posted by Marcus von Cube, Germany on 16 Mar 2012, 4:17 a.m.,
in response to message #3 by Alessandro Castellani (Italy)

A hang is always a bad thing and should never happen. If you can reproduce the case I'd be glad to analyze it.

Pauli has explained it: The two values are used as a bound if the function evaluates to opposite signs on each of the points.

                        
Re: WP34S solver
Message #5 Posted by Alessandro Castellani (Italy) on 16 Mar 2012, 6:44 p.m.,
in response to message #4 by Marcus von Cube, Germany

Hi Marcus,

unfortunately I'm not able to reproduce the solver crash but I can crash the calculator in this way:
1-reset the calculator
2-type a number
3-press very fastly ,at least twenty times ,the white down arrow key [SST]
4-without waiting repeat point 2 and 3 several times (usually 2)
at this point my calculator is frozen and I have to reset it.

Alessandro

                              
Re: WP34S solver
Message #6 Posted by fhub on 16 Mar 2012, 7:16 p.m.,
in response to message #5 by Alessandro Castellani (Italy)

Quote:
I can crash the calculator in this way:
1-reset the calculator
2-type a number
3-press very fastly ,at least twenty times ,the white down arrow key [SST]
4-without waiting repeat point 2 and 3 several times (usually 2)
at this point my calculator is frozen and I have to reset it.

Yep, that's indeed a procedure that happens very often in every day's use! ;-)
                              
Re: WP34S solver
Message #7 Posted by Marcus von Cube, Germany on 16 Mar 2012, 7:17 p.m.,
in response to message #5 by Alessandro Castellani (Italy)

What is the current program?

                                    
Re: WP34S solver
Message #8 Posted by Alessandro Castellani (Italy) on 17 Mar 2012, 2:31 a.m.,
in response to message #7 by Marcus von Cube, Germany

Hi Marcus,

my version is 2641 and there isn't a current program after I've resetted. Battery level is 2.9
I think that crash isn't caused from what keys I press but only from the speed of typing in.
I'm new to WP34 but in the first two hours I've used ,testing SLV and not making this unusual procedure,
I had to reset four times: perhaps this is only a problem of my unit.
Alessandro

                                          
Re: WP34S solver
Message #9 Posted by pascal_meheut on 17 Mar 2012, 2:52 a.m.,
in response to message #8 by Alessandro Castellani (Italy)

I can reproduce it. You are not alone :-)

                                                
Re: WP34S solver
Message #10 Posted by Marcus von Cube, Germany on 17 Mar 2012, 2:27 p.m.,
in response to message #9 by pascal_meheut

I must admit that I was able to reproduce the hang myself. I have no idea what goes wrong here and my hardware debugging unit is broken. I'm going to increase the probability of the fault by creating a version with a much shorter keyboard buffer. Maybe I get an idea what the cause is.

                                                      
Re: WP34S solver
Message #11 Posted by Marcus von Cube, Germany on 18 Mar 2012, 9:32 a.m.,
in response to message #10 by Marcus von Cube, Germany

The latest build contains a fix in the watch dog reset logic. In theory this should at least help to recover from any hangs. The calculator should show a "Reset" message after a few seconds.

I hope this helps.

Edit: The watch dog might well have been the culprit. It is served only when a heartbeat kicks in. With a full keyboard buffer, the heartbeats are ignored and thus it's possible that the watch dog isn't served in time. I may add another call to the watch dog reset routine if a valid keystroke is executed to avoid this.

Edited: 18 Mar 2012, 11:56 a.m.

                                                            
Re: WP34S solver
Message #12 Posted by Alessandro Castellani (Italy) on 19 Mar 2012, 7:59 a.m.,
in response to message #11 by Marcus von Cube, Germany

Hi Marcus,

thanks, I'll try it as soon as possible.

Alessandro

                  
Re: WP34S solver
Message #13 Posted by Walter B on 16 Mar 2012, 4:35 a.m.,
in response to message #3 by Alessandro Castellani (Italy)

"Sometimes" and "rarely" are two invincible enemies of troubleshooting. Please try to reproduce your observations under controlled conditions. We are most willing to debug, but need your support by a proper specification. Mille grazie!

                        
Re: WP34S solver
Message #14 Posted by Alessandro Castellani (Italy) on 16 Mar 2012, 6:01 a.m.,
in response to message #13 by Walter B

Quote:
"Sometimes" and "rarely" are two invincible enemies of troubleshooting. Please try to reproduce your observations under controlled conditions. We are most willing to debug, but need your support by a proper specification. Mille grazie!

I know , I'll try to reproduce the conditions that cause the crash on my calculator so you can eliminate the problem.

Thanks

Alessandro

      
Re: WP34S solver
Message #15 Posted by Marcus von Cube, Germany on 15 Mar 2012, 3:27 p.m.,
in response to message #1 by Alessandro Castellani (Italy)

The two estimates are by no means a bound. You cannot count on the fact that the solution is between the two values in X and Y. Pauli can give you the details of the solver algorithm.

            
Re: WP34S solver
Message #16 Posted by Paul Dale on 15 Mar 2012, 6:32 p.m.,
in response to message #15 by Marcus von Cube, Germany

The solver should stay within the two estimate if they produce function evaluations of opposite signs. Otherwise, they are just used as a guide and it is free to wander outside.

The solver uses a quadratic interpolation step but this is guarded against going to far or encountering problems with either a secant or bisection step instead.

I have code to use Ridder's method after a bisection instead of the quadratic interpolation. This is supposed to be better but I never noticed enough of an improvement to justify its inclusion and so it isn't included in the build.

- Pauli


[ Return to Index | Top of Index ]

Go back to the main exhibit hall