Skip to content
Prev 48237 / 63424 Next

precedence (was 'historical NA question')

On May 7, 2014, at 5:17 PM, Herv? Pag?s <hpages at fhcrc.org> wrote:

            
On what grounds? -2 is one value - negative two - and if you square it, you get four - so that's not even a question of precedence. It's just a matter of interpretation: do you see the constant -2 or do you see the constant 2 with unary minus? When you print -2 you get -2 - and that's not a positive constant with an unary minus - or is it? ;) - aaah, will we ever know ? R is good at hiding that subtlety from us:
-2^2
-2^2
[1] -4
[1] 4
Wrong tree ;). You kick-started the trip but failed to follow the path it takes into the depths of the human mind ? :P (or was that computer mind? ;))

Cheers,
Simon