HP Prime lockup (not a complaint)
|
03-20-2015, 11:33 PM
Post: #1
|
|||
|
|||
HP Prime lockup (not a complaint)
Perhaps I've bitten off more than I can chew with this calculator, but I've been itching to try it now for over a year and finally pulled the trigger. My daily school calculator is an Nspire CX CAS and I was interested to see how the two machines functioned side-by-side so the very first thing I did after charging and updating the OS through the connectivity kit was to input a vexing homework problem to compare results.
I asked the machines to find the derivative of sqrt(3x+sqrt(3x+sqrt(3x))) and the two calculators both spit out answers within a second. Impressive. Since the two displayed different results and the Prime wasn't set to simplify, I used the simplify softbutton. It locked up, stayed frozen for about 4 minutes and then rebooted. So, this isn't a complaint about the lock up, but I've read that one of the devs wanted to know what people had been doing to the calculator prior to experiencing a lockup. In short, I'd done nothing except configure language, set the time and date and looked at the different setting menus. This command was the first one I'd asked the machine to do and it was fresh out of the retail packaging. I don't know if it's helpful or not but that's about as virgin a lockup as I can think of to offer you. Thanks for this machine. It's pretty awesome and I'm nowhere capable of exceeding its capabilities! |
|||
03-21-2015, 01:02 AM
Post: #2
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
Welcome to the forum!
(03-20-2015 11:33 PM)Dynablue Wrote: so the very first thing I did after charging and updating the OS through the connectivity kit was to input a vexing homework problem to compare results.So, just for the records and since firmware is a moving target, your Prime was running firmware 6975 (as of 2014-12-03), right? I don't know, if it matters, but since it could at least in theory, is it a NW280AA or a G8X92AA unit? Greetings, Matthias -- "Programs are poems for computers." |
|||
03-21-2015, 01:12 AM
Post: #3
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
Good point:
Software: 6975 Hardware: A CAS: 1.1.2-11 OS: SDKV0.44_R.521 |
|||
03-21-2015, 01:37 AM
Post: #4
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
Finally found it..
Model: NW280AA |
|||
03-21-2015, 05:32 AM
Post: #5
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
Welcome to the club of Prime users & owners.
As you will see from other threads in this forum, freezing or locking up is part of the package. That's why I'm in the group of owners who don't use - it would be interesting to know the relative sizes of the two groups. After some time you could feel confident enough to actually complain about such occurences. |
|||
03-22-2015, 12:36 AM
Post: #6
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
hi
I have similar experience in CAS with an other computation: I am trying to calculate and simplify a trivial differentiation in the complex space ∂(√(z-i))/∂z , where z ∈ C The answer should be: 1/(2√(z-i)) Trying different ways in the PRIME: In CAS mode entering: diff(√(z-i),z) results in some wacko answer: 1/2*(()*diff(im(z),z)/(re(z)+√((re(z))^2+(im(z)-1)^2))+()*(-(diff(re(z),z))-1/2*(2*diff(re(z),z)*re(z)+2*diff(im(z),z)*(im(z)-1))/√((re(z))^2+(im(z)-1)^2))*(im(z)-1)/(re(z)+√((re(z))^2+(im(z)-1)^2))^2)*√(2*(re(z)+√((re(z))^2+(im(z)-1)^2)))+1/2*(diff(re(z),z)+1/2*(2*diff(re(z),z)*re(z)+2*diff(im(z),z)*(im(z)-1))/√((re(z))^2+(im(z)-1)^2))*(()*(im(z)-1)/(re(z)+√((re(z))^2+(im(z)-1)^2))+1)/√(2*(re(z)+√((re(z))^2+(im(z)-1)^2))) simplify(diff(√(z-i),z)) results in a dump followed by lock up which I have to reboot to recover from. What am I doing wrong here? Interestingly the prime have not problem calculating: diff(√(z-1),z) where z ∈ R (I assume Prime assumes R) which results in the correct: (1/2)/√(z-1) My Prime has the following configuration: Model: NW280AA Software: 6975 Hardware: A CAS: 1.1.2-11 OS: SDKV0.44_R.521 CAS settings are: Complex: ticked Use i: ticked |
|||
03-22-2015, 02:36 AM
Post: #7
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
Yes, try
diff((z-i)^(1/2),z) should return the desired result without fuss. Sometimes sqrt() has problems, especially if complex is checked in CAS settings. |
|||
03-22-2015, 03:06 AM
Post: #8
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
"I asked the machines to find the derivative of sqrt(3x+sqrt(3x+sqrt(3x))) and the two calculators both spit out answers within a second. Impressive. Since the two displayed different results and the Prime wasn't set to simplify, I used the simplify softbutton. It locked up, stayed frozen for about 4 minutes and then rebooted."
Try expand(), followed by collect(). Do you like that expression? But I agree, simplify() shouldn't lock-up - - if it can't handle the expression, it should exit with an error message, like "too complicated." |
|||
03-22-2015, 05:16 PM
(This post was last modified: 03-22-2015 05:20 PM by Anders.)
Post: #9
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
Helge Gabert,
Thanks! The x^y power function/button works correctly as do the n root function/button diff((z-i)^1/2,z) produces the correct 1/(2(z-i)^1/2) and so does diff(2√(z-i),z). The conclusion is to avoid the simple square root button altogether. It is at least broken when used with complex numbers in derivation. However, pressing the simplify button (on 1/(2(z-i)^1/2)) results in a new lock up which I have to reboot to recover from. As you wrote, simplify should not do that (especially in this case as there is not much to simplify). |
|||
03-22-2015, 06:36 PM
Post: #10
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
It seems I must add some checks before running some algebraic algorithms on square roots, since it's just too easy to hit the simplify key (or set simplification to maximum) even if there is no hope to simplify anything and computations will be very expensive (that's the case if there are embedded square roots, or for square roots of complex numbers).
|
|||
03-23-2015, 08:43 PM
Post: #11
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
parisse,
yes you are right, I think there are 2 problems possibly related: - the basic square root function √ is broken for complex numbers (at least when differentiating) on its own unrelated to simplify. It would be great for it to be fixed in an update (The x^n and n√x works correctly on the same expression!) - the simplify function should as you wrote have some sort of expression check prior trying to simplify to avoid lock-ups |
|||
03-23-2015, 10:31 PM
Post: #12
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
(03-23-2015 08:43 PM)Anders Wrote: parisse, I believe the function described above is Multivalued in the complex numbers' field. Some multivalued functions don't work in complex field correctly. This error showed on HP Prime demonstrated the multivalued behaviour of the square root function in my opinion. |
|||
03-24-2015, 01:20 AM
Post: #13
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
(03-23-2015 10:31 PM)Anderson Costa Wrote:(03-23-2015 08:43 PM)Anders Wrote: parisse, Possibly you are right in how square root was implemented. Though I have not exhaustively tried, all other functions I have tried with complex variables (and numbers) work as they should. |
|||
03-24-2015, 06:30 AM
Post: #14
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
No, the problem is that sqrt of a complex number is rewritten as a+i*b, which in general will involve embedded sqrt, and further computations take too much time on the Prime or can not be easily interrupted, unlike with Xcas on a PC.
|
|||
05-16-2015, 11:49 PM
(This post was last modified: 05-17-2015 02:50 AM by Anders.)
Post: #15
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
Yes, so trying my little trivial example of diff((z-i)^1/2,z) again with the new firmware 7820 results in the correct:
(1/2)/√(z-i) Great! this bug is fixed. Now, I could not resist but to press the simplify button again on (1/2)/√(z-i) and unfortunately this results in spinning hour glass (top right corner) and gives eventually physical prime: √(IM(z)2+RE(z) 2-2*IM(z)+1) * √(√(z2 + 1*(-2-IM(z)2*RI…. and strangely on the virtual calculator a different result (complex unchecked): (z^2*√(z^3+√(z^2+1)*(z^2-2*z+2)-2*z^2+2*z-2)+z*√(z^2+1)*√(z^3+√(z^2+1)*(z^2-2*z+2)-2*z^2+2*z-2)-z*√(z^3+√(z^2+1)*(z^2-2*z+2)-2*z^2+2*z-2)+(-1-)*√(z^2+1)*√(z^3+√(z^2+1)*(z^2-2*z+2)-2*z^2+2*z-2)+(1+)*√(z^3+√(z^2+1)*(z^2-2*z+2)-2*z^2+2*z-2))/(2*z^4*√2+2*z^3*√2*√(z^2+1)+(-4-2*)*z^3*√2+(-4-2*)*z^2*√2*√(z^2+1)+(4+4*)*z^2*√2+(4+4*)*z*√2*√(z^2+1)+(-4-4*)*z*√2+(-4*)*√2*√(z^2+1)+(4*)*√2) Obviously, simplify() is not necessary in this example, but since it did not work well with the old f/w I just had to try it again. Also: collect() applied to (1/2)/√(z-i) results in (1/2)/√(z-i) which is fine. |
|||
05-17-2015, 01:37 AM
Post: #16
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
(05-16-2015 11:49 PM)Anders Wrote: Yes, so trying my little trivial example of diff((z-i)^1/2,z) of again with the new firmware 7820 results in the correct: You must have "Complex" checked in the CAS Settings on your physical prime and unchecked on the emulator. That still doesn't explain why simplify returns a much more "complex" result. Ceci n'est pas une signature. |
|||
05-17-2015, 02:41 AM
(This post was last modified: 05-17-2015 02:53 AM by Anders.)
Post: #17
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
Yes complex was unchecked on the virtual CAS setting.
When both have complex flag set, they both return the same rather "complicated" expression when applying simplify(1/2)/√(z-i) (√((im(z))^2+(re(z))^2-2*im(z)+1)*√(√(z^2+1)*(-(im(z))^2*(re(z))^2+2*(im(z))^2*re(z)+..... The points I am trying to make here are: 1) Simplify() applied to this simple expression with square roots including i (regardless if complex is checked or not) results in something more "complicated". 2) If complex is unchecked then it is just a different but still more "complicated" expression. 3) We uncovered this issue (or a variation of this issue) in the older f/w release and it is still there (it have change nature slightly in the result produced though). |
|||
05-17-2015, 06:47 AM
Post: #18
|
|||
|
|||
RE: HP Prime lockup (not a complaint)
The simplification rewrites square root of complex numbers in terms of square root of real numbers, hence it taks time and looks more complicated, especially if z is not declared as a real variable. There is no magic algorithm to simplify an expression (unfortunately)...
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)