Possible bug in CAS?
01-25-2016, 08:14 PM (This post was last modified: 01-25-2016 08:24 PM by MrMcChicken.)
Post: #1
 MrMcChicken Junior Member Posts: 11 Joined: Sep 2015
Possible bug in CAS?
Hello,
I am doing some really basic calculations with complex numbers. After entering some random stuff I think I found a bug.
If I enter: simplify(squareroot(x^2*y^2)) my Prime shows: -x*y.
The emulator shows: abs(x)*abs (y) which is fine.
Both run on the latest Firmware (8151).
Can somebody confirm this issue?

Greetings, MrMcChicken

Edit: It happens too with simplify(squareroot((x^4*y^4)) = -x^2*y^2
01-25-2016, 09:24 PM
Post: #2
 primer Member Posts: 135 Joined: Sep 2015
RE: Possible bug in CAS?
(01-25-2016 08:14 PM)MrMcChicken Wrote:  If I enter: simplify(squareroot(x^2*y^2)) my Prime shows: -x*y.
mine gives expected result : abs(x)*abs(y)

primer
01-25-2016, 09:58 PM
Post: #3
 salvomic Senior Member Posts: 1,366 Joined: Jan 2015
RE: Possible bug in CAS?
(01-25-2016 09:24 PM)primer Wrote:  mine gives expected result : abs(x)*abs(y)
mine also.
Please, check the CAS Settings: I've Exact, Use β, Principal, not: Complex, use i, increasing. Simplify minimum...

Salvo

β«aLβ0mic (IT9CLU), HP Prime 50g 41CX 71b 42s 12C 15C - DM42 WP34s :: Prime Soft. Lib
01-25-2016, 11:46 PM (This post was last modified: 01-25-2016 11:48 PM by primer.)
Post: #4
 primer Member Posts: 135 Joined: Sep 2015
RE: Possible bug in CAS?
(01-25-2016 09:58 PM)salvomic Wrote:  I've Exact, Use β, Principal, not: Complex, use i, increasing. Simplify minimum...
same as you : three options on left are checked (exact...)
and three ones on the right are not.

Maybe you defined an "assume" ? or something like that ?
I never remember where we can see existing assumes, but I think purge() cmd does remove all of them, check help before usage, just in case...

Regards.

primer
01-26-2016, 09:13 AM
Post: #5
 MrMcChicken Junior Member Posts: 11 Joined: Sep 2015
RE: Possible bug in CAS?
I found the source of the problem. If "use i" is checked i get -x*y as a result.
Why is this so? Is this a bug? Thanks for help so far.

Greetings, MrMcChicken
01-26-2016, 11:41 AM
Post: #6
 parisse Senior Member Posts: 1,036 Joined: Dec 2013
RE: Possible bug in CAS?
If you set complex mode on ("use i" on the Prime), then sqrt(x^2) is no more equal to |x| and the system chooses one of the two complex square roots.
Should perhaps be somewhere in a FAQ.
 « Next Oldest | Next Newest »

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