HP Forums
wp34s, another shutdown situation - 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, another shutdown situation (/thread-245057.html)



wp34s, another shutdown situation - Andrew Nikitin - 06-15-2013

Here is how to reproduce:
64 MODE DENMAX DENFAC -- fractions of an inch mode

Start 'TRI' solver from library. (I did it trough CAT, select LBL'TRI', XEQ, in case that matters).

"Trigon" : [R/S]

a= : 6.1.2 [R/S]

b= : 4.7.8 [R/S]

c= : 6 [R/S]

alpha= : 0 [R/S]

beta= : 0 [R/S]

gamma= : 0 [R/S]

Solution: [R/S]

-- and calculator shuts down.

This happens on real device every time, did not try on emulator, both my calculators do that. The one with newer firmware blinks "Bye...", so it must be a "proper" shutdown.

It may or may not be related to
LINESQ step through bug, which also shuts down the calculator.


Re: wp34s, another shutdown situation - Paul Dale - 06-15-2013

Thanks for this. We will investigate once Marcus returns from his holiday.


- Pauli


Re: wp34s, another shutdown situation - Walter B - 06-16-2013

This shutdown doesn't happen on the emulator (3407). AFAICS the program runs flawless there.

d:-)


Re: wp34s, another shutdown situation - Paul Dale - 06-16-2013

I suspect this and the earlier one are related to error handling. Further investigation prove this or otherwise, however Marcus is in the best position to determine the root cause at present.


- Pauli


Re: wp34s, another shutdown situation - Dieter - 06-16-2013

Here everything also works fine on "the real thing" with firmware 3.2 3405 (incl. printer/timer support).

XEQ"TRI"    TriGon
[R/S] a=
6.1.2 [R/S] b=
4.7.8 [R/S] c=
6 [R/S] alpha=
[R/S] beta=
[R/S] gamma=
[R/S] Solution:
[R/S] a= 13/2
[R/S] b= 39/8
[R/S] c= 6/1
[R/S] alpha= 106036/1461 (= 72,57768...)
[R/S] beta= 455593/9971 (= 45,69180...)
[R/S] gamma= 444151/7195 (= 61,73050...)
[R/S] P= 139/8 (= 17,375)
[R/S] A= 64091/4593 (= 13,95406...)
Calling the program via CAT and XEQ (or ENTER) does not make a difference. No errors here.

Dieter


Re: wp34s, another shutdown situation - Andrew Nikitin - 06-16-2013

Dieter, are you sure you set both DENMAX=64 and DENFAC?
From the format of the answers it does not look that way.

The effect can be seen when the above settings are set and not in a "regular" fraction mode.

Edited: 16 June 2013, 10:00 p.m.


Re: wp34s, another shutdown situation - Walter B - 06-17-2013

Looks like DENFAC contains the root cause. The error does neither happen with DENANY nor DENFIX on the "real thing" (3.2 3407).

d:-)

Edited: 17 June 2013, 12:35 a.m.


Re: wp34s, another shutdown situation - Dieter - 06-17-2013

No, I obviously overlooked that detail. With these settings I can reproduce the error. Seems to be something in the fractions settings.

One more reason for the metric system. ;-)

Dieter


Re: wp34s, another shutdown situation - Paul Dale - 06-17-2013

I'm pretty sure the GCD algorithm used to reduce the terms to their lowest form is the problem. It uses a huge number of digits to guarantee correct results for gcd(max-real, min-real). I think this is causing the volatile stack to overflow into important stuff. As a top level operation there is space for this, but not when called from a long chain from the display handler.

I made a change last night to just use the smaller modulus function instead but this isn't ideal since the GCD and LCM user functions will break for some inputs.


- Pauli


Re: wp34s, another shutdown situation - Andrew Nikitin - 06-19-2013

Maybe fraction display code could use special (internal) GCD/LCM version. It only needs to work with integers under 9999. Unlike generic function that has to deal with entire range.


Re: wp34s, another shutdown situation - Paul Dale - 06-19-2013

More code would be required. Flash is full.


- Pauli