From 3f82f09927c0584b3769ac2d9a9624512fafe793 Mon Sep 17 00:00:00 2001 From: Justin Martin Date: Sat, 3 Dec 2011 18:43:05 +0000 Subject: [PATCH] Documented NaN behaviour. Closes bug #60346. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@320310 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/types/float.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/language/types/float.xml b/language/types/float.xml index 3fd2946641..e64debed11 100644 --- a/language/types/float.xml +++ b/language/types/float.xml @@ -88,6 +88,22 @@ EXPONENT_DNUM [+-]?(({LNUM} | {DNUM}) [eE][+-]? {LNUM}) + + + NaN + + Some numeric operations can result in a value represented by the constant + NAN. This result represents an undefined or + unrepresentable value in floating-point calculations. Any loose or strict + comparisons of this value against any other value, including itself, will + have a result of &false;. + + + Because NAN represents any number of different values, + NAN should not be compared to other values, including + itself, and instead should be checked for using is_nan. + +