Re: Re: power operator (again)

From: Date: Thu, 19 Dec 2013 23:08:45 +0000
Subject: Re: Re: power operator (again)
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-70775@lists.php.net to get a copy of this message
> So I'm really confused now as to why people think -2 ** 2 should equal > 4. -2² is -4. Why should -2**2 equal 4? Maybe the reason is lazy use of parentheses by math teachers? Imagine a teacher writing "-2 -1 0 1 2" on the board, then later adding the exponent: "Now, we take the square of each." The "-" and "2" might seem to be stuck together, since they were on the board first (?). And the main takeaway for students is that the square of a negative is positive, so the parens aren't emphasized at that particular time. Just an idea.... -- S.

« previous php.internals (#70775) next »