Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52668 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94231 invoked from network); 1 Jun 2011 12:43:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2011 12:43:51 -0000 Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:33233] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/16-61684-40436ED4 for ; Wed, 01 Jun 2011 08:43:49 -0400 Received: by bwz18 with SMTP id 18so7315bwz.29 for ; Wed, 01 Jun 2011 05:43:45 -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:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=Cco3G19oNuP9SOQU5//96z8r5qjftBvcrE+ppZRn/k0=; b=hgsoogN9dqoP+04KXWBVH69pqZPLOVdPBeQueCqzuaTKerucjP0nyEnEfIHbbjac2n Z/LEOq+vBAX6yAP3BocZ9SlN2o/D9dPjRg9ca/rC8xByK/HXCwcVq+hW5V/oM/72nwyj F6Ciwr6Ib79Hk6xmEYZN2xxJqLn683miSHmGY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=Yh7k5MBx9+xFdqo0Y2Poo/kLrMnD6OVHPPCOfLFr49f2dd0MSwHhA/E0iMUrvjYU4e kztB0LI0d+W1WCLNdrKMWnSTYI3yuC58W2JqMgz1fdbK+97rbQb48Hk9RMq/qSW5m9uI 2On38hhFsmSTnuIkTZ61rHQ2jjKT18uUT03K0= MIME-Version: 1.0 Received: by 10.204.18.193 with SMTP id x1mr1489943bka.79.1306932224460; Wed, 01 Jun 2011 05:43:44 -0700 (PDT) Sender: tjerk.meesters@gmail.com Received: by 10.204.103.15 with HTTP; Wed, 1 Jun 2011 05:43:44 -0700 (PDT) In-Reply-To: References: <2EFE9027-13EA-4570-B6D2-2C56D85C7DAE@macvicar.net> Date: Wed, 1 Jun 2011 20:43:44 +0800 X-Google-Sender-Auth: CxUhObFyLGaoWaa4VFbR2oV43Qs Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] INF behavior From: datibbaw@php.net (Tjerk Anne Meesters) On Wed, Jun 1, 2011 at 6:04 AM, Gustavo Lopes wrote: > On Tue, 31 May 2011 22:41:36 +0100, Hannes Landeholm > wrote: > >>> Agree with Derick, strictly speaking, in maths science, INF != INF. >> >> I disagree,based on quote from >> http://compilers.iecc.com/comparch/article/98-07-134: >> >> "Since a projective infinity doesn't have a sign, comparing a floating >> point value other than infinity to a projective infinity is unordered. >> However, a projective infinity is equal to itself." >> > > Yes, as I argued, for purposes of IEEE 754, it's certainly the case that INF > = INF. > > This may not be true for certain meanings of "infinity" or notions of > ordering, but we have a standard for floating point arithmetic with > well-defined terms and rules which we ought to follow. > > As a curiosity, Mathematica defines the result of Equal[Infinity, Infinity] > and Equal[Overflow, Overflow], but not for ComplexInfinity or Indeterminate > (similar to NaN): > > In[1]:= ComplexInfinity == ComplexInfinity > Out[1]= ComplexInfinity == ComplexInfinity > In[2]:= Infinity == Infinity > Out[2]= True > In[3]:= Overflow == Overflow > Out[3]= True > In[4]:= Indeterminate == Indeterminate > Out[4]= Indeterminate == Indeterminate That, and the fact that "a != b" should always imply "a !== b" imo. And if you must compare with SQL it would be something more akin to "is_infinite(a)" > > -- > Gustavo Lopes > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- -- Tjerk