HP Forums

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

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

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

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.

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.

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.

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.

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.