Re: power operator (again)
| From: | Daniel Lowrey | Date: | Thu, 19 Dec 2013 12:33:48 +0000 |
| Subject: | Re: power operator (again) | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-70750@lists.php.net to get a copy of this message | ||
> Thanks for all your effort! Unfortunately, since there's no option for
> negative numbers to intuitively square to positive outcomes, my vote is
> still No. I understand and respect your reasoning even though I do not
> agree with it.
To me this is not a question of "intuitive" vs. "unintuitive" ... -3^2 = -9
is how the preponderance of credible resources evaluate the expression. As
far as I can tell voting "no" on this basis is equivalent to me claiming
the earth is flat because it better fits my world-view.
- http://www.wolframalpha.com/input/?i=-3%5E2
- https://www.google.com/search?q=-3%5E2
-
http://math.stackexchange.com/questions/491933/exponent-rules-with-negative-numbers
The RFC's implementation is consistent with those found in other languages
and is (IMO) sensible as long as you play by the rules. Until someone
points out a valid problem other than "I don't like right associativity,"
I'm inclined to vote yes.