Post Reply 
CAS : strange error on simplify
09-10-2015, 10:28 PM
Post: #1
CAS : strange error on simplify
Hello,
in CAS setting, please select "USE i", "complex" and "Maximum simplification"
now type the following (-sq(2+sq(2))+i*sq(2-sq(2)))^2
ok, now press ENTER
and I got this message :"Warning! Algebraic extension not implemented yet for poly [-1,0,8,-8,2] " displayed 4 times on the screen.
very strange for a so simple expression

Please note we don't have message if we choose "minimun" as "simplify in CAS setting !
Best Regards.
Find all posts by this user
Quote this message in a reply
09-11-2015, 01:45 AM
Post: #2
RE: CAS : strange error on simplify
I wouldn't call that an error- - it is just a warning message - - although times 4, which doesn't appear to be necessary.

Assuming that by sq() you mean square root [sqrt()], if you expand() your expression first, and then simplify(), you will not receive those 4 warning messages, regardless whether you have the CAS settings on Maximum or Minimum simplification.
Find all posts by this user
Quote this message in a reply
09-13-2015, 05:31 PM (This post was last modified: 09-13-2015 05:33 PM by Brad Barton.)
Post: #3
RE: CAS : strange error on simplify
I find that if I turn of Maximum Simplification, that I don't get the error message. Using Minimum Simplification, and pressing Enter, I get the correct answer by pressing the Simplify soft key a couple of times.

It looks like the Prime is able to handle the expression, but Maximum Simplification might be causing the trouble.
Find all posts by this user
Quote this message in a reply
09-13-2015, 08:48 PM (This post was last modified: 09-13-2015 11:07 PM by primer.)
Post: #4
RE: CAS : strange error on simplify
(09-11-2015 01:45 AM)Helge Gabert Wrote:  I wouldn't call that an error- - it is just a warning message (...)

Well, don’t call it an error if you want, but I think it’s still a real issue :
  • First : It’s unexpected to get warning here for such a simple expression. (even if there is probably good a reason to get warning, it's maybe not obvious to every one, as it's easy to perform this manually with the only knowledge i^2=-1)
  • Second : the message does not mean anything, it may be helpful to developer but not to user! (and I have to speak about the way it’s displayed : the first time I beleived my prime went crash, that's awful… at least we could have a kind of msgbox with OK)
  • Third : (I recently discover that) the result is just WRONG, I manually perform the simplify, and I don’t find same result… (I doubled check, if you find I made an error please let me know… otherwise you may conclude there is something wrong.)

And yes, as I wrote, changing the Symplify mode does change the behavior, as Brad Barton experienced it too (thank you, I'm not alone Wink ).

I took screenshots (virtual hp prime) :

-> here with minimal simplyfication, no warning, wrong result.

[Image: 2s93iib.png]


-> here with maximal simplyfication, weird warning, same wrong result.

[Image: 2mchzwx.png]

-> here the manual and detailled simplyfication I made on paper with expected result (sorry for bad scan quality)

[Image: eqse8o.png]

So, I think that both warning msg and result are issues.
My wish is only to try to tackle bugs to make it better. If people think it can be enhanced/fixed that's would be great.


Best Regards,
Find all posts by this user
Quote this message in a reply
09-14-2015, 12:32 AM
Post: #5
RE: CAS : strange error on simplify
I typed your equation into the emulator:

(−√(2+√(2))+i*√(2-(√(2))))^2

and hit enter. The result is on the second level of the stack in the attachment below.

Then I hit simplify. That result is incorrectly displayed on the first level of the stack in the attachment.

Then I clicked on the answer on the first level and hit enter to copy the answer into the command line. The correct answer appeared!

   

It appears the answer in memory is correct, but it is displayed incorrectly on the stack.

road
Find all posts by this user
Quote this message in a reply
09-14-2015, 12:46 AM
Post: #6
RE: CAS : strange error on simplify
To elaborate:

The displayed answer,

2-2*i*sqrt(2)

should be

(2-2*i)*sqrt(2)

it is missing a pair of parentheses but it is correct when copied into the command line.

road
Find all posts by this user
Quote this message in a reply
09-14-2015, 01:56 AM
Post: #7
RE: CAS : strange error on simplify
   

I agree. I did the check (simplified expression - original expression = 0?) without noticing that the copied result has an extra pair of parens. Good catch!
Find all posts by this user
Quote this message in a reply
09-14-2015, 01:50 PM
Post: #8
RE: CAS : strange error on simplify
This error on the stack displaying an incorrect expression should be fixed.

It could occur in other manipulations involving complex numbers.

Hope the HP people check into this matter.

Bill
Find all posts by this user
Quote this message in a reply
09-14-2015, 04:17 PM
Post: #9
RE: CAS : strange error on simplify
I've filed it. Thanks.

It is related to the 2d display for sure.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
09-17-2015, 02:44 PM
Post: #10
RE: CAS : strange error on simplify
For the record, here is another instance where this happens (incorrect copy into the command line, this time with eigenvals):

   

eigenvals() saves the eigenvalues into a vector, but the vector's brackets disappear when copying the result into the command line. This means that further calculations, e.g., referencing individual eigenvalues, like . . . (1) or . . . (2) won't work as intended (except if the user inserts the brackets manually).

BTW, EIGENVAL() does not exhibit this peculiarity.
Find all posts by this user
Quote this message in a reply
09-17-2015, 06:07 PM
Post: #11
RE: CAS : strange error on simplify
More precisely, sequences are not displayed correctly in textbook mode.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)