HP Forums

Full Version: WP34S solver
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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.

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.

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.

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.

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

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.

"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!

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

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

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! ;-)

What is the current program?

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

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

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.

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.

Hi Marcus,

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

Alessandro