how can you tell between negation and subtraction?

# Thread: how can you tell between negation and subtraction?

1. Senior Member
Join Date
Dec 1969
Posts
336

## how can you tell between negation and subtraction?

I&#039;ve got a formula. If I figure it out using the precedence rules I&#039;m familiar with, it gives me a result of -32. If I interpret it as negation, it works out, but I&#039;m used seeing negation as the - symbol being right next to the number.<BR><BR>Negation -2<BR>Subtraction - 2<BR><BR>Can anyone explain in more detail the difference between negation and subtraction.

2. blah Guest

## RE: how can you tell between negation and subtract

they are really the same thing.<BR><BR>5 plus -3 = 2<BR>5 - 3 = 2

3. Senior Member
Join Date
Dec 1969
Posts
96,118

## negation: nothing left of minus sign

That is:<BR><BR>-32<BR>- 32<BR>-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 32<BR><BR>all of those are negation. The spaces are *not* at all significant!<BR><BR>77-32<BR>77 - 32<BR>77&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 32<BR><BR>all of those are subtraction, because there is another aritmetic term to the left of the minus sign.<BR><BR>Of course, in reality negation *is* subtraction. It&#039;s just that there is a leading zero that is "understood" to precede the minus sign, that&#039;s all.<BR><BR>(Well, that&#039;s mathematically true, but it is also true that negation has a different "precendence" than subtraction. In fact, it has one of the highest precendences! That is:<BR><BR>7 * -5<BR><BR>is interpreted as "negate the 5 first and then multiply by 7".<BR><BR>Whereas <BR><BR>7 * 12 - 5<BR><BR>is interpreted as "multiply 7 times 12 first and then subtract 5".<BR><BR>See the significant difference in the precedence?<BR><BR>

4. J. Paul Schmidt Guest

## Great answer Bill - Sounds like it could be a FAQ

Especially interesting point about the precedence issue where you wrote the following:<BR>&#060;&#060;<BR>Well, that&#039;s mathematically true, but it is also true that negation has a different "precendence" than subtraction. In fact, it has one of the highest precendences!<BR>&#062;&#062;<BR><BR>Best regards,<BR>-Paul<BR><BR>J. Paul Schmidt, MBA<BR>Databases on the Web<BR>http://www.Bullschmidt.com<BR><BR>

5. Senior Member
Join Date
Dec 1969
Posts
96,118

## RE: Great answer...except I can't spell?

I can&#039;t believe I misspelled "precedence" not once but twice!<BR><BR>I wonder if I copy/pasted the first one to create the second. I can&#039;t believe that I&#039;d type it wrong twice in a row!<BR><BR>Urkle.<BR><BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•