Re: cvs: php-src /ext/standard/tests/math bug45712.phpt ZendEngine2 zend_operators.c
| From: | Jani Taskinen | Date: | Thu, 07 Aug 2008 10:15:07 +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-52084@lists.php.net to get a copy of this message | ||
Antony Dovgal kirjoitti:
On 07.08.2008 14:02, Jani Taskinen wrote:Ok.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.
I stand corrected. Thanks. --JaniIs 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