Re: Re: power operator (again)
| From: | Sanford Whiteman | Date: | Thu, 19 Dec 2013 22:34:31 +0000 |
| Subject: | Re: Re: power operator (again) | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-70770@lists.php.net to get a copy of this message | ||
> - (3**2) is simply not the same as (- 3)**2 but '-3' should always be (-3) the
> space has a significance in this case as far as I am concerned.
But it doesn't... the - is just another operator (even in "real math")
and doesn't have the highest precedence, space or not.
What's fascinating is that some portion of devs have been making
assumptions for years and years and only now is there an case that
requires consensus -- since the (wrong) assumption still ends up with
the right results ~100% of the time given the current precedence table
and other math rules.
-- S.