Re: [PHP-DEV] INF behavior

2011-09-05 Thread Hannes Magnusson
On Tue, May 31, 2011 at 21:33, Philip Olson wrote: > Hello everyone, > > There are differing opinions on this matter so I'll base a conclusion on > current SVN: > > - Both (INF==INF and INF===INF) are true in PHP 5_4 because it's the correct > behavior > - PHP 5_3 will continue as is for BC reas

Re: [PHP-DEV] INF behavior

2011-06-01 Thread 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

Re: [PHP-DEV] INF behavior

2011-05-31 Thread 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 poin

Re: [PHP-DEV] INF behavior

2011-05-31 Thread Hannes Landeholm
> 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.

Re: [PHP-DEV] INF behavior

2011-05-31 Thread Julien Pauli
Agree with Derick, strictly speaking, in maths science, INF != 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

Re: [PHP-DEV] INF behavior

2011-05-31 Thread Philip Olson
Hello everyone, There are differing opinions on this matter so I'll base a conclusion on current SVN: - Both (INF==INF and INF===INF) are true in PHP 5_4 because it's the correct behavior - PHP 5_3 will continue as is for BC reasons (INF==INF = false, INF===INF = true) So unless something cha

Re: [PHP-DEV] INF behavior

2011-05-27 Thread Derick Rethans
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 the > > test (bug45712.phpt) contains code similar to the following: > > > > > $inf = pow(0, -2); > > >

Re: [PHP-DEV] INF behavior

2011-05-27 Thread Gustavo Lopes
Em Fri, 27 May 2011 04:03:01 +0100, Philip Olson escreveu: Hello geeks, A geek is needed to clarify PHP bug #45712. This is an edge case but the test (bug45712.phpt) contains code similar to the following: That's how it's behaved since ~forever (AFAICT) and remains in 5.3.7-dev, but

Re: [PHP-DEV] INF behavior

2011-05-27 Thread Richard Quadling
On 27 May 2011 08:17, Ferenc Kovacs wrote: > On Fri, May 27, 2011 at 6:10 AM, 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 the >> test (bug45712.phpt) contains code sim

Re: [PHP-DEV] INF behavior

2011-05-27 Thread Ferenc Kovacs
On Fri, May 27, 2011 at 6:10 AM, 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 the > test (bug45712.phpt) contains code similar to the following: > > > > > $inf = pow(0, -2);

Re: [PHP-DEV] INF behavior

2011-05-26 Thread Scott MacVicar
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 the test > (bug45712.phpt) contains code similar to the following: > > $inf = pow(0, -2); > > var_dump($inf); // float(INF) > var_dump($inf == $inf)