Post Reply 
Unary minus precedence preference
06-03-2024, 09:51 PM (This post was last modified: 06-03-2024 09:56 PM by Johnh.)
Post: #40
RE: Unary minus precedence preference
Of course it's all a matter of conventions, established by mathematicians over hundreds of years. So my view as an engineer is irrelevant:

But, when I see that -2 at the start of an expression, my view is its not expressing that we have subtracted 2 from 0, even though it's the same value -2 is a digit, like 0 or 2 or 123. We need it as such, and in complex numbers we need the imaginary negatives too. Digits must take priority. The problem is we use the same symbol for subtraction as for negative numbers. So we need a convention, or brackets to clarify.

We can write 1 + -2, and we know what we mean, its -1 The same should apply to -2 + 1, and also 3 x -2 = -6, then so does -2 x 3. We should be able to extend to things like exponents too. Eg, the square root of -9 needs to be 3i, not -3.

In practice, despite any convention, all real world systems and written expressions should have enough brackets etc, so that any of these discussions and anomalies are bypassed.

And isn't RPN great! how it just jumps so cleanly over all these issues!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Unary minus precedence preference - Johnh - 06-03-2024 09:51 PM



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