HP Forums
[WP34s] RUN instead of STOP ? - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: [WP34s] RUN instead of STOP ? (/thread-220734.html)



[WP34s] RUN instead of STOP ? - fhub - 05-10-2012

As the header says: since a few versions the WP34s shows RUN instead of STOP (for the R/S key) when entering or listing a program.

Is this intended? Looks quite strange ...

BTW, I've found a small bug in my TVM solver - I'll release a new version today after a few more tests.

Franz

Edited: 10 May 2012, 5:02 a.m.


Re: [WP34s] RUN instead of STOP ? - Paul Dale - 05-10-2012

Quote:
As the header says: since a few versions the WP34s shows RUN instead of STOP (for the R/S key) when entering or listing a program.

Not sure where this is coming from -- it is wrong nonetheless. I can duplicate in 2939 firmware and 2975 in the emulator.


Quote:
BTW, I've found a small bug in my TVM solver - I'll release a new version today after a few more tests.

We await the new version.....


- Pauli


Re: [WP34s] RUN instead of STOP ? - fhub - 05-10-2012

Quote:
We await the new version.....

Well, it was not really a serious problem, i.e. it didn't return any wrong results. It was just so that the solver SLV didn't get the correct (intended) 2 initial guesses but some other meaningless values, so it may fail in some cases when solving for I.

But it seems that bug-fixing isn't always a goos idea. :-(

Now that I use the 2 correct initial guesses, _sometimes_ the solver fails because of a different problem: it produces values <= -1 for the internal interest rate during the SLV process, and so the financial equation stops with an error (because ln(1+x) is of course not defined for x<=-1.

Now my question: should I implement a test for i<=-1 and return NaN in this subroutine for SLV?

Can SLV handle such NaN 'results' and what would SLV do in this situation?

Franz


Re: [WP34s] RUN instead of STOP ? - Paul Dale - 05-10-2012

Quote:
Can SLV handle such NaN 'results' and what would SLV do in this situation?

It fails immediately on a NaN if the user has flag D set. Without flag D set, the command interpreter fails when a NaN result would occur (with a Domain Error).


- Pauli


Re: [WP34s] RUN instead of STOP ? - fhub - 05-10-2012

Ok, then NaN is definitely no option in the TVM equation.

What I still don't understand is how SLV could ever reach such values i<=-1 if I use I1=0% and I2=1% as initial guesses!?

I guess I'll have to make more tests, and maybe I'll have to even completely rewrite this (solving for I) part of TVM ... :-(

Franz


Re: [WP34s] RUN instead of STOP ? - Paul Dale - 05-10-2012

If the initial guesses don't bracket the solution, solve looks elsewhere.

0% and 100% might be better guesses.

- Pauli


Re: [WP34s] RUN instead of STOP ? - fhub - 05-10-2012

Quote:
If the initial guesses don't bracket the solution, solve looks elsewhere.

I always thought that SLV would build a quadratic function from the initial guesses and use the zero(s) of this parabola as new root-estimation!?

Well, then I'll try 100% as 2nd value ...

Franz


Re: [WP34s] RUN instead of STOP ? - Paul Dale - 05-10-2012

Quadratic interpolation is one of the methods uses. That doesn't help if a NaN result appears.


What's: 3 x2 + NaN x - 2???


- Pauli


Re: [WP34s] RUN instead of STOP ? - Valentin Albillo - 05-10-2012

Quote:
What's: 3 x2 + NaN x - 2???

NaN

Regards from V.




Re: [WP34s] RUN instead of STOP ? - No longer! - Marcus von Cube, Germany - 05-10-2012

Quote:
As the header says: since a few versions the WP34s shows RUN instead of STOP (for the R/S key) when entering or listing a program.
Is this intended? Looks quite strange ...

It used to show STOP in any case, even when RUN was meant. I changed it when I added the printer trace function to make the printout more meaningful. I just forgot about program mode. :-(

Fixed!