Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52572 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59474 invoked from network); 31 May 2011 19:40:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 May 2011 19:40:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=doctorrock83@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=doctorrock83@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: doctorrock83@gmail.com X-Host-Fingerprint: 209.85.220.170 mail-vx0-f170.google.com Received: from [209.85.220.170] ([209.85.220.170:35513] helo=mail-vx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FF/D5-25701-B3445ED4 for ; Tue, 31 May 2011 15:40:43 -0400 Received: by vxb40 with SMTP id 40so3965111vxb.29 for ; Tue, 31 May 2011 12:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=gJjwWZzGSaCATWjVHstHw/+yoxc5lLsmqQFuZgq2oFg=; b=iF57wPHpW+SLHtVxJK2T841dJ/wxScQFxiX2fXpIAM2ii4uj1h5oFM9Iv23+WaR/7D 0TPMUHj5LSu17v8CxqRU9NnKcv5c9euwOWeVb7/oXGf9ITrZUnWoAUvldtJgZk+WfwEX Gv4aLLbPtmY3ziwMksQCGVbmuNvXp+GFnzcpg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=HoCmeuorG65gm/aft2rESvXcuQjoD8YzJiGlweWFwShm9lxwuIsCDBPZXd6dBfRhct Hc/GldKWmnuG/XJhdMqPAqWsB6pFVd2n/v5rtnSLAUN5jl20D489Mo751popBvZTjcJJ 17l8SdrFiqQ2P/rxeMigMU6Ou7lOVPRb4Q+QE= Received: by 10.220.200.11 with SMTP id eu11mr2300971vcb.251.1306870840824; Tue, 31 May 2011 12:40:40 -0700 (PDT) MIME-Version: 1.0 Sender: doctorrock83@gmail.com Received: by 10.220.177.203 with HTTP; Tue, 31 May 2011 12:39:59 -0700 (PDT) In-Reply-To: References: <2EFE9027-13EA-4570-B6D2-2C56D85C7DAE@macvicar.net> Date: Tue, 31 May 2011 21:39:59 +0200 X-Google-Sender-Auth: 8y8JeZ3iVx22Bm8HiN_qM0Hj8_I Message-ID: To: Derick Rethans Cc: Scott MacVicar , Philip Olson , PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] INF behavior From: jpauli@php.net (Julien Pauli) Agree with Derick, strictly speaking, in maths science, INF !=3D INF. But I dont care if PHP tells me than yes, because PHP is not designed to solve high level maths problems :) Cheer, Julien.Pauli On Fri, May 27, 2011 at 4:48 PM, Derick Rethans wrote: > On Thu, 26 May 2011, Scott MacVicar wrote: > >> On 26 May 2011, at 20:03, Philip Olson wrote: >> >> > Hello geeks, >> > >> > A geek is needed to clarify PHP bug #45712. This is an edge case but t= he test (bug45712.phpt) contains code similar to the following: >> > >> > > > $inf =3D pow(0, -2); >> > >> > var_dump($inf); =A0 =A0 =A0 =A0 =A0// float(INF) >> > var_dump($inf =3D=3D =A0$inf); // bool(false) >> > var_dump($inf =3D=3D=3D $inf); // bool(true) >> > ?> >> > >> > That's how it's behaved since ~forever (AFAICT) and remains in 5.3.7-d= ev, but PHP 5.4.0-dev changes behavior so both now return true. >> > >> > Is this is how we want it? And how should this be documented/explained= ? >> >> I think I changes this :-) >> >> It didn't make sense that =3D=3D and =3D=3D=3D produce different results= . >> >> Though if someone has a better understanding of maths then we can fix it= . > > I think it does make sense. =3D=3D is the equal operator, and INF is not > equal to INF (just like SQL NULL is not equal to NULL). However, they > are identical (like you can test in SQL with NULL IS NULL). > > cheers, > Derick > > -- > http://derickrethans.nl | http://xdebug.org > Like Xdebug? Consider a donation: http://xdebug.org/donate.php > twitter: @derickr and @xdebug > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >