The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

[WP34s] RUN instead of STOP ?
Message #1 Posted by fhub on 10 May 2012, 5:02 a.m.

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 ?
Message #2 Posted by Paul Dale on 10 May 2012, 5:11 a.m.,
in response to message #1 by fhub

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 ?
Message #3 Posted by fhub on 10 May 2012, 5:38 a.m.,
in response to message #2 by Paul Dale

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 ?
Message #4 Posted by Paul Dale on 10 May 2012, 6:19 a.m.,
in response to message #3 by fhub

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 ?
Message #5 Posted by fhub on 10 May 2012, 6:28 a.m.,
in response to message #4 by Paul Dale

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 ?
Message #6 Posted by Paul Dale on 10 May 2012, 6:36 a.m.,
in response to message #5 by fhub

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 ?
Message #7 Posted by fhub on 10 May 2012, 6:43 a.m.,
in response to message #6 by Paul Dale

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 ?
Message #8 Posted by Paul Dale on 10 May 2012, 6:46 a.m.,
in response to message #7 by fhub

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 ?
Message #9 Posted by Valentin Albillo on 10 May 2012, 9:15 a.m.,
in response to message #8 by Paul Dale

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

NaN

Regards from V.

      
Re: [WP34s] RUN instead of STOP ? - No longer!
Message #10 Posted by Marcus von Cube, Germany on 10 May 2012, 12:30 p.m.,
in response to message #1 by fhub

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!


[ Return to Index | Top of Index ]

Go back to the main exhibit hall