Post Reply 
Easy question
09-06-2021, 05:39 PM
Post: #8
RE: Easy question
(09-06-2021 01:17 AM)Albert Chan Wrote:  
(09-01-2021 04:11 PM)toml_12953 Wrote:  8. AND and NOT
9. OR and XOR

This is not what is observed in CAS (or XCAS) … perhaps a bug ?

HOME> true OR false AND false      → 1
CAS>    true OR false AND false      → false

Good note!

I tried three of the other evaluation environments (the interval byte code evaluator of the Advanced Graphing app, the BCD byte code evaluator of the Function app, and the Python terminal).

ADV_GR> V1: X^2+Y^2<1 OR X>0 AND Y>0 → AND higher prec. than OR
FUNCT> F1(X)= true OR false AND false → 1 (AND higher prec. than OR)
PYTH> True or False and False → True (AND higher prec. than OR)

Getting a consistent evaluation order also involves internal conversions between formats.

Error propagation / short-circuiting is another consideration with logical operations. (The BCD byte code evaluator is more of a “push” evaluator than a “pull” evaluator, so error propagation matching the PPL evaluator’s didn’t just immediately occur naturally during implementation. That said, converting the BCD evaluator to a “pull” approach is something I have on my list of “desirable changes”.)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Easy question - boggiano - 09-01-2021, 10:10 AM
RE: Easy question - roadrunner - 09-01-2021, 11:54 AM
RE: Easy question - rawi - 09-01-2021, 04:02 PM
RE: Easy question - toml_12953 - 09-01-2021, 04:11 PM
RE: Easy question - jte - 09-06-2021, 12:36 AM
RE: Easy question - Albert Chan - 09-06-2021, 01:17 AM
RE: Easy question - ijabbott - 09-06-2021, 12:41 PM
RE: Easy question - jte - 09-06-2021, 10:31 PM
RE: Easy question - Albert Chan - 09-07-2021, 01:09 AM
RE: Easy question - jte - 09-09-2021, 05:55 PM
RE: Easy question - jte - 09-06-2021 05:39 PM
RE: Easy question - boggiano - 09-09-2021, 10:44 AM
RE: Easy question - Joe Horn - 09-09-2021, 05:40 PM
RE: Easy question - boggiano - 09-09-2021, 06:05 PM
RE: Easy question - toml_12953 - 09-09-2021, 10:10 PM
RE: Easy question - boggiano - 09-09-2021, 10:32 PM
RE: Easy question - ijabbott - 09-09-2021, 11:59 PM
RE: Easy question - Albert Chan - 09-10-2021, 05:23 PM
RE: Easy question - ijabbott - 09-10-2021, 06:09 PM
RE: Easy question - boggiano - 09-11-2021, 12:16 AM
RE: Easy question - toml_12953 - 09-11-2021, 11:14 AM



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