On Wed, Jun 1, 2011 at 6:04 AM, Gustavo Lopes <glo...@nebm.ist.utl.pt> wrote: > On Tue, 31 May 2011 22:41:36 +0100, Hannes Landeholm <landeh...@gmail.com> > 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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php