Post Reply 
CAS Problem
10-22-2023, 11:53 PM (This post was last modified: 10-23-2023 12:25 AM by springer5.)
Post: #1
CAS Problem
Hi

Just been working through some simple expressions on my HP Prime and found an anomaly.
I'm not sure if I'm missing something here.

In CAS mode, if I enter....

EQ(8^(-3/2),(sqrt 8)^(-3)), I should get 1 in return because these expressions are equivalent.

Instead I get 0.

Replacing the above with any value other than 8 and all is correct, but with 8 it screws up.

Am I missing something or is this a bug, and if its a bug is it specific to the Prime, or CAS calculators in general?

Can anyone try this with a different model of CAS calculator and see what happens?

I'd be really interested to know what's going on here because this is pretty basic stuff to be getting wrong.

Thanks for any help.
Find all posts by this user
Quote this message in a reply
10-23-2023, 02:21 AM
Post: #2
RE: CAS Problem
Same on my physical G2. Used EQ help example, replaced the 1,2,3 with the entries in this bug query.
Find all posts by this user
Quote this message in a reply
10-23-2023, 03:01 AM
Post: #3
RE: CAS Problem
When idid it on the android app it gave 1

See attachment


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
10-23-2023, 03:15 AM
Post: #4
RE: CAS Problem
Same on the ios version. The help file says EQ is equivalent to ==. The help file for == says the behavior depends on the cas simplification setting. Changing to maximum simplification causes 8^(-3/2)==sqrt(8)^(-3) to return 1, but does not cause EQ(8^(-3/2),sqrt(8)^(-3)) to return 1. Either the help file for EQ is incorrect or the command has a bug.

- neek
Find all posts by this user
Quote this message in a reply
10-23-2023, 04:23 AM
Post: #5
RE: CAS Problem
There is strange behavior I don't understand when I change to exact it gives 0, not sure why exact on would affect the test but it does
Find all posts by this user
Quote this message in a reply
10-23-2023, 07:06 AM
Post: #6
RE: CAS Problem
CAS == does not check if expressions are mathematically equivalent, it checks if they have the same internal representation (as expressions). Using == should therefore be limited to objects that are always in "normal" form like integers or rationals. For everything else, one should make the difference and apply some simplification rules, and see if it's 0 or not.
Note that for floats, using == should also not be used, instead one should take abs(difference) and compare to a (relative) precision.
Find all posts by this user
Quote this message in a reply
10-23-2023, 08:38 AM (This post was last modified: 10-23-2023 08:46 AM by springer5.)
Post: #7
RE: CAS Problem
Thanks for the replies. I initially wondered if I was using EQ incorrectly. However even dividing one expression by the other should give 1 and it doesn't.
It gives 1 fior every other value but not for 8.

For me the problem exists on both my Android version and my physical calculator.

If I switch off the exact setting in CAS settings it works OK (on both) but not when exact is on. Yet every other number seems OK either way.

Surely this must be a bug?

Does anyone have TI or Casio CAS calculator to try it with please? I only have Prime here.

Just out of interest.

Thanks
Find all posts by this user
Quote this message in a reply
10-23-2023, 08:42 AM (This post was last modified: 10-23-2023 08:44 AM by springer5.)
Post: #8
RE: CAS Problem
(10-23-2023 03:01 AM)Dougggg Wrote:  When idid it on the android app it gave 1

See attachment

Thanks for the screenshot Doug. That's weird because my Android Prime gives 0.

Is your "exact" box in CAS settings checked or unchecked?
Unchecked seems to make it work properly for me, but it should work with exact checked as well.
Find all posts by this user
Quote this message in a reply
10-23-2023, 09:18 AM
Post: #9
RE: CAS Problem
Yea with exact checked it does give 0
Find all posts by this user
Quote this message in a reply
10-23-2023, 02:52 PM
Post: #10
RE: CAS Problem
Hi everyone.
As Bernard Parisse noted in a previous answer, some sort of simplification must be used to check for mathematically equivalent expressions in CAS: EQ(simplify(8^(-3/2)),simplify(sqrt(8)^(-3))) returns 1.
Additionally I'm not sure if EQ is a native CAS function. It can be used in HOME and CAS modes but EQ is not mentioned in Xcas documentation.

Sorry for my English.

Regards.
Find all posts by this user
Quote this message in a reply
10-29-2023, 11:56 AM
Post: #11
RE: CAS Problem
(10-23-2023 08:38 AM)springer5 Wrote:  Does anyone have TI or Casio CAS calculator to try it with please? I only have Prime here.

was this requested ?
(I have no mathematical education, see signature, but some calculators)

TI-92 / TI-nspire
   
   

8years elementary school and 2y business school, no bachelor or master;
but always interested in simple mathematics and calculators
Find all posts by this user
Quote this message in a reply
Post Reply 




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