Post Reply 
Emulator Bug
05-08-2022, 10:31 PM (This post was last modified: 05-08-2022 10:33 PM by ijabbott.)
Post: #8
RE: Emulator Bug
(05-08-2022 09:21 PM)toml_12953 Wrote:  
(05-08-2022 11:56 AM)Albert Chan Wrote:  Another bug (same for both CAS and XCAS)

CAS> x := 12
CAS> x /= 2*3      → 18 (not 2 ?)
CAS> x                  → 6 (not 2 ?)

/= had unexpected high precedence. "x /= 2*3" parsed as "(x /= 2) * 3"

I'd expect the results the Prime gets since division and multiplication are performed left to right.

Based on common usage in 'C' like languages, I would expect /= to have the same precedence as simple assignment.

I think we can at least agree that the manuals do a lousy job at documenting operator precedence and associativity.

— Ian Abbott
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Emulator Bug - Eddie W. Shore - 03-30-2022, 07:26 PM
RE: Emulator Bug - Wes Loewer - 03-31-2022, 03:11 PM
RE: Emulator Bug - Eddie W. Shore - 04-05-2022, 12:59 AM
RE: Emulator Bug - Albert Chan - 04-05-2022, 11:16 AM
RE: Emulator Bug - calc_freak - 04-05-2022, 03:59 AM
RE: Emulator Bug - Albert Chan - 05-08-2022, 11:56 AM
RE: Emulator Bug - toml_12953 - 05-08-2022, 09:21 PM
RE: Emulator Bug - ijabbott - 05-08-2022 10:31 PM
RE: Emulator Bug - mfleming - 05-09-2022, 12:01 PM
RE: Emulator Bug - toml_12953 - 05-09-2022, 06:06 PM
RE: Emulator Bug - KeithB - 05-09-2022, 12:29 PM
RE: Emulator Bug - ijabbott - 05-09-2022, 08:10 PM
RE: Emulator Bug - mfleming - 05-10-2022, 11:50 AM



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