>>>1 + -2 - -3
>>>
>>>it evaluates to 2
>>>
>>>it is equivalent to
>>>
>>>1 - 2 + 3
>>
>>Ok, now rewrite it as 1 + -1*2 - -1*3 and the result is:
>
>It's also equivalent to
>
>1 + ( 0 - 2 ) - ( 0 - 3 )
>
>but that's pretty much beside the point...
>
>>TaDaaaaa: 2 - same thing. The rules of precedence are preserved.
>
>The first law of mathodynamics is the precedence is always preserved. *lol*
>
>>Now, explain to me this "tightly bound" theory. I don't remember seeing that in any text books or math papers. ;)
>
>That's my own spin on it as an attempt to impress how the sign of the number has precedence over an exponentiation operator.
Ok, I get it now. The unary operator takes precedence over exponentiation because..... you want it to? I tried that philosophy out when I was in school in hopes of perfect scores on everything. Oddly, it didn't work out that way. ;)
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement