Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70774 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36157 invoked from network); 19 Dec 2013 23:08:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2013 23:08:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:42901] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/30-42949-38C73B25 for ; Thu, 19 Dec 2013 18:08:52 -0500 Received: by mail-ob0-f170.google.com with SMTP id wp18so1934085obc.1 for ; Thu, 19 Dec 2013 15:08:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=v1PMlwal1LoKlRobIS6yH1kl82m14qwtt1EoOfApy2c=; b=kJOA1TkSorGN5RivN02NifYIKoQMUTosa7XBc0v5DHOvcjZv9TriXhmm4/g5kfKQSz BR0zSRVIqnSt3AxzICmyQliz73NVRfLEUhat0MG7cf/BLNjYPMgyeW9ehzdaXmyA5E6/ LquhpVXJHwet1ca9zs9dB+ScCyqPOy8e2264EYiaHaAyd3y/Mvftqi0x1QT6GdwOG7BF 8W59xn/2PezZpXYWkXD/WTpcYJ35LTVJEuIdwyMIrGgY4dfAd/kS8rlIOBJOq2sMI0Pq 9v9+xqW3hSMKIMAJGhchuFzZAzPg4GB/XE+DxfzRkqpMcA8x6oRJyZcvBgeLPaxj2qxJ 9taw== MIME-Version: 1.0 X-Received: by 10.60.95.135 with SMTP id dk7mr3382283oeb.11.1387494529040; Thu, 19 Dec 2013 15:08:49 -0800 (PST) Received: by 10.76.12.135 with HTTP; Thu, 19 Dec 2013 15:08:48 -0800 (PST) In-Reply-To: References: Date: Thu, 19 Dec 2013 16:08:48 -0700 Message-ID: To: Kris Craig Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e011603c68808b304edeb3ec5 Subject: Re: [PHP-DEV] Re: power operator (again) From: morrison.levi@gmail.com (Levi Morrison) --089e011603c68808b304edeb3ec5 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Dec 19, 2013 at 2:50 PM, Kris Craig wrote: > On Thu, Dec 19, 2013 at 4:33 AM, Daniel Lowrey wrote: > > > > 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. > > > That's a faulty analogy. In mathematics, the square of any number, > positive or negative, yields a positive result. Any scientific or graphing > calculator will match that behavior. I did sqr(-3) in the Windows > Calculator just now and it outputted 9, not -9. > The problem here is that `pow(-3, 2)` is equivalent to the expression `(-3) ** 2`, not `-(3 **2)`. Said differently, `-3 ** 2` is equivalent to `-pow(3,2)` and not `pow(-3,2)`. Hopefully this helps. --089e011603c68808b304edeb3ec5--