Doc #60346 [Asn->Csd]: NAN != NAN

From: Date: Sat, 03 Dec 2011 19:25:06 +0000
Subject: Doc #60346 [Asn->Csd]: NAN != NAN
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7520@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60346&edit=1 ID: 60346 Updated by: frozenfire@php.net Reported by: yunosh@php.net Summary: NAN != NAN -Status: Assigned +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: Linux PHP Version: 5.4.0RC1 Assigned To: frozenfire Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Master was down during commit, so the fix was revision 320310. Previous Comments: ------------------------------------------------------------------------ [2011-12-03 06:14:01] frozenfire@php.net My intention is to document NaN in the float type document, as a subsection. I'll make mention of the spec behaviour. ------------------------------------------------------------------------ [2011-11-21 20:10:24] cataphract@php.net Thank you for the report, but this has already been discussed and 5.4's behavior follows IEEE 754-2008. See http://marc.info/?l=php-internals&m=130649054107748 ------------------------------------------------------------------------ [2011-11-21 14:32:30] laruence@php.net I think NAN - NAN is undefined behavior, so you should not rely on such statements. and I will mark this as a doc request, which request to explain the NAN's features. :) ------------------------------------------------------------------------ [2011-11-21 13:50:32] yunosh@php.net You are right. I tracked a failing unit test with PHP 5.4.0RC down the wrong code path. The regression is in a different place. In PHP 5.3 abs(NAN - NAN) <= 0 evaluates to true, in PHP 5.4 it evaluates to false. And if you wonder where this strange code is coming from: https://github.com/sebastianbergmann/phpunit/blob/3.5/PHPUnit/Framework/Constraint/IsEqual.php#L363 This seems to have been worked around in later PHPUnit versions though. ------------------------------------------------------------------------ [2011-11-21 13:02:27] laruence@php.net what do you mean by regression ? I have tested in PHP 5.2.14, the same output as PHP 5.4 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=60346 -- Edit this bug report at https://bugs.php.net/bug.php?id=60346&edit=1

« previous php.doc.bugs (#7520) next »