Post Reply 
Order of operations - what is 6÷2(1+2) ?
01-04-2021, 03:39 PM
Post: #83
RE: Order of operations - what is 6÷2(1+2) ?
(01-04-2021 04:26 AM)rprosperi Wrote:  If the equation is ambiguous and precedence rules are not provided, a 'correct' answer is not possible, and it probably means someone is trying to lure you in to a conversation like this one. Smile

Code:


TryAPL Version 3.4.1 (Dyalog version 18.0)
Mon Jan 04 2021 07:31:33
Copyright (c) Dyalog Limited 1982-2021
      -2*2
¯4
       ¯2*2
4
What other languages disambiguate such expressions by providing a separate symbol for a negative value?

Remember kids, "In a democracy, you get the government you deserve."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Order of operations - what is 6÷2(1+2) ? - mfleming - 01-04-2021 03:39 PM



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