Post Reply 
Unary minus precedence preference
07-21-2014, 09:13 PM
Post: #3
RE: Unary minus precedence preference
(07-21-2014 08:09 PM)walter b Wrote:  Seems unary minus being the Loch Ness monster of our forum: tends to appear every once and a while and is almost impossible to get rid of in times where news are scarce.

IIRC, we had a very similar thread recently. Anyway (and once more):
-2^2 = (-1)*2^2 = (-1)*4 = -4 , unambiguously.

it's always unambiguous when it's done your way, isn't it? Smile
Your algebra just shows that you choose to assign a precedence identical to multiplication, but I wasn't looking for a proof, but for any reasons that could push you to choose one or the other way, because we could have a system flag that allows you to choose one way or the other if there's enough reason to justify that.
Everybody seems to stick to one rigid position, while some people keep getting confused by this, so is it justified to give the option? Or such an option would cause even more confusion?

Claudio
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Unary minus precedence preference - Claudio L. - 07-21-2014 09:13 PM



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