The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

WP34S derivative and solver reset
Message #1 Posted by Alessandro Castellani (Italy) on 28 Mar 2012, 4:31 a.m.

Hi,I want to evaluate the first derivative of this function on my wp34s: f(x)=(3x-x^2)/(x-4) and I wrote this program:

LBL A
STO 00
3
x
RCL 00
x^2
-
RCL 00
4
-
/
RTN

LBL B
f'(x)A
RTN

I enter , as initial estimates, -10 and 10 then SLV B as reply I read reset on display.
I know that at x=4 y=infinity and that first derivative is 0 at x=2 and x=6 but I expect that calculator give me a math error and not a reset
I haven't tried with the emulator and my software version is the last V3 2685. If I give more precise estimates like 0 and 3 the solution is Ok.

Thanks in advance.

Alessandro

      
Re: WP34S derivative and solver reset
Message #2 Posted by Paul Dale on 28 Mar 2012, 4:51 a.m.,
in response to message #1 by Alessandro Castellani (Italy)

I can reproduce a lock up here, although it isn't a reset.

I suspect it might be related to nesting these functions not being quite right. Marcus will have to look into where the crash occurs I suspect. This was an addition to version 3 firmware that hasn't been exhaustively tested.

As an aside, the registers X, Y Z & T all contain the value to evaluate at so the use of register 00 isn't really required.

- Pauli

      
Re: WP34S derivative and solver reset
Message #3 Posted by Marcus von Cube, Germany on 28 Mar 2012, 7:37 a.m.,
in response to message #1 by Alessandro Castellani (Italy)

Pauli, what firmware? There was an issue with the watch dog not resetting the device properly but locking it up instead. Alessandro's case makes me believe that the watch dog kicks in because it isn't serviced in time by the solver routine. I'll check it.

Edit: I get a stack overflow even in the emulator :-(

Edit again: I can rule out the watch dog, it must be an access violation of sorts which happens during the SLVS step. Now it gets tricky to find out what happened.

Edit again: I found an uninitialized variable in the solver, chances are rising that I can fix the bug.

Edited: 28 Mar 2012, 9:40 a.m.

      
Re: WP34S derivative and solver reset - solved (hopefully)
Message #4 Posted by Marcus von Cube, Germany on 28 Mar 2012, 9:50 a.m.,
in response to message #1 by Alessandro Castellani (Italy)

Revision 2726 should fix this nasty bug. Dominic, this is something to be back ported to V2 because it seemed like an old one. Look for the changes in decn.c!

I've updated the release ZIP file, too.

Edited: 28 Mar 2012, 10:33 a.m.

            
Re: WP34S derivative and solver reset - solved (hopefully)
Message #5 Posted by Dominic Richens on 28 Mar 2012, 1:02 p.m.,
in response to message #4 by Marcus von Cube, Germany

Yes, it's time to update the V22 zip file - it has been four months and I think there are a few other bug fixes that you guys have submitted to the V22 branch since then.

                  
Re: WP34S derivative and solver reset - solved (hopefully)
Message #6 Posted by Marcus von Cube, Germany on 28 Mar 2012, 4:01 p.m.,
in response to message #5 by Dominic Richens

You'll need to fix decn.c before you compile.

Edit: I've modified the source but you need to compile the stuff.

Edited: 28 Mar 2012, 4:11 p.m.

                        
Re: WP34S derivative and solver reset - solved (hopefully)
Message #7 Posted by Dominic Richens on 29 Mar 2012, 2:15 p.m.,
in response to message #6 by Marcus von Cube, Germany

I build the current V2.2 source files and uploaded a zip file with calc.bin, calc_full.bin and the windows emulator updated.

V2.2 zip file

The version is "34S V2.2 2738"

I didn't do any extensive testing, just make sure the calc_full.bin would flash my HP-20b, that VERS returned the expected alpha and that basic calculations worked. I didn't actually verify that any of the bugs that are supposedly fixed with this build are fixed. I'll leave that to some intrepid V2.2 user.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall