HP Forums
Too hard to root - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Too hard to root (/thread-20614.html)



Too hard to root - hp-zl - 10-09-2023 04:50 PM

HP-Prime G2 firmware 2.1.14730 (2023 04 13)
CAS Mode.
CAS Settings, Simplify: Minimum

Screenshot #1.
No problem. Correct operation after pressing "Enter" or "Shift+Enter (≈)".

We repeat the command (screenshot no. 2), but first we set:
CAS Settings, Simplify: Maximum (screenshot no. 3).
After pressing "Enter" or "Shift+Enter ( ≈)", HP-Prime freezes (screenshot no. 4 - see upper right corner).
Now, if I press "On" after about 12 seconds, I will see the following text: "HP-Prime had a problem and will reboot in 3 secunds".

Could someone confirm this error? Maybe it's just my HP that does this?

[attachment=12634] [attachment=12635] [attachment=12636] [attachment=12637]


RE: Too hard to root - Xorand - 10-10-2023 03:50 AM

Same result here (crashed when I pressed the "On" button, though, not the Enter button).

G2
Same firmware


RE: Too hard to root - hp-zl - 10-10-2023 04:48 AM

Sorry for the typographical error: it was supposed to be "On" key.
I corrected it.


RE: Too hard to root - parisse - 10-10-2023 10:59 AM

If you want to help me track these kind of bugs, please provide the input as a text commandline. This way I can copy/paste it easily (this is also true for other users). Screenshots are not as useful, because you have to rewrite manually the expression, this is time consuming and errorprone. Here it would be
Code:
a:=(5+sqrt(5))^(1/4)*sqrt(40*sqrt(5+sqrt(5))+15*sqrt(10)+25*sqrt(2));
simplify(a);
Now, it's not really surprising that simplify seems to run forever. Simplifying square roots or fractional powers in a CAS means construct an algebraic extension of Q that contains all sqrt and fractional powers and do polynomial arithmetic modulo the minimal polynomial of the generator of the extension. Here we must contain sqrt(5) and sqrt(2) (order 4), then also sqrt(5+sqrt(5)) (order 8), then sqrt of all of theses (order 16) and also (sqrt(5)+5)^(1/4) : we are probably at order 32 with very large coefficients.
If you press ON during a computation, some CAS operations (e.g. usual binary operation), will check if ON has been pressed and try to propagate an interruption error. But unlike on a PC, embedded versions of giac are compiled without exceptions support, which make it much harder to abort cleanly. This is probably why you got a reboot.
And unfortunately, it's almost impossible to fix. The only change I can make is to add some maximum values here and there, like the maximum value for a multiprecision integer, maximum number of terms in a list, etc. There is a balance between power users who know what the CAS can solve and do not want to be limited, and other users who try to simplify expressions like that and will experience reboots...