Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52600 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19507 invoked from network); 31 May 2011 22:04:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 May 2011 22:04:35 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.22 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.22 smtp2.ist.utl.pt Linux 2.6 Received: from [193.136.128.22] ([193.136.128.22:44240] helo=smtp2.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 09/22-25701-0F565ED4 for ; Tue, 31 May 2011 18:04:34 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.ist.utl.pt (Postfix) with ESMTP id D07437000498 for ; Tue, 31 May 2011 23:04:29 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp2.ist.utl.pt ([127.0.0.1]) by localhost (smtp2.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id XWF+pqGTPbpe for ; Tue, 31 May 2011 23:04:29 +0100 (WEST) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 91B3B7000496 for ; Tue, 31 May 2011 23:04:29 +0100 (WEST) Received: from cataphract-old (unknown [IPv6:2001:690:2100:501:2817:e493:1889:fdde]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 622012008620 for ; Tue, 31 May 2011 23:04:29 +0100 (WEST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net References: <2EFE9027-13EA-4570-B6D2-2C56D85C7DAE@macvicar.net> Date: Tue, 31 May 2011 23:04:34 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_IST?= Message-ID: In-Reply-To: User-Agent: Opera Mail/11.11 (Win32) Subject: Re: [PHP-DEV] INF behavior From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") 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 -- Gustavo Lopes