Post Reply 
Report problems with Grapher, CAS and User Interface
07-16-2024, 09:02 PM
Post: #32
RE: Report problems with Grapher, CAS and User Interface
(07-09-2024 03:59 AM)compsystems Wrote:  I think the evaluation priority of the operator (==) follows a strange rule.

Looking at the sequence of expressions from top to bottom, this expression should evaluate the left side, then the right side and then check for equality, because step by step it does it but in one expression it does not.

Moreover, when entering the expression (5==5) == ((e^(π*i)+1)==0) it writes it in a strange way => (5==5) AND (5==(e^(π*i)+1)==0))

[Image: cas_hp_prime_p16_image00.png]

One possible issue at play here is operator chaining. (https://en.wikipedia.org/wiki/Relational...r_chaining)

For chained relational operators OP1 and OP2, “A OP1 B OP2 C” is interpreted as “A OP1 B and B OP2 C”. Chaining relational operators is fairly typical in a mathematics context, but not so common in a computer programming context.

I'd think the presence of the parentheses rules should rule out chaining in this case.

Some portions of the HP Prime currently chain relational operators whilst other portions do not, or only under certain restrictions. PPL didn't chain relational operators initially, but was later changed to chain relational operators in limited ways. The Advanced Graphing interpreter chains relational operators. Python chains relational operators (and handles parentheses how I'd expect, comparing “1 < 4 > 2” to “(1 < 4) > 2” in a Python interpreter).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Report problems with Grapher, CAS and User Interface - jte - 07-16-2024 09:02 PM



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