Re: cvs: php-src /ext/standard/tests/math bug45712.phpt ZendEngine2 zend_operators.c
| From: | Derick Rethans | Date: | Thu, 07 Aug 2008 10:22:45 +0000 |
| Subject: | Re: cvs: php-src /ext/standard/tests/math bug45712.phpt ZendEngine2 zend_operators.c | ||
| References: | 1 2 3 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-52085@lists.php.net to get a copy of this message | ||
On Thu, 7 Aug 2008, Antony Dovgal wrote:
> On 07.08.2008 14:02, Jani Taskinen wrote:
> > You fixed by changing the test to be wrong? :)
>
> No, I fixed the test to show the same behavior with 4.4, 5.2, 5.3 and HEAD.
> I also fixed comparison of NaN with empty strings and numbers.
>
> > Is not $nan == $nan or $nan === $nan true ?
>
> No, they are not equal:
> "A NaN does not compare equal to any floating-point number or NaN,
> even if the latter has an identical representation. One can therefore test
> whether a variable has a NaN value by comparing it to itself (i.e. if then x
> is NaN)."
> http://en.wikipedia.org/wiki/NaN
It's like NULL in SQL...
regards,
Derick
--
HEAD before 5_3!: http://tinyurl.com/6d2esb
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org