svn: /phpdoc/en/trunk/language/types/ float.xml
| From: | Justin Martin | Date: | Sat, 03 Dec 2011 18:43:05 +0000 |
| Subject: | svn: /phpdoc/en/trunk/language/types/ float.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-9130@lists.php.net to get a copy of this message | ||
frozenfire Sat, 03 Dec 2011 18:43:05 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=320310
Log:
Documented NaN behaviour. Closes bug #60346.
Bug: https://bugs.php.net/60346 (error getting bug
information)
Changed paths:
U phpdoc/en/trunk/language/types/float.xml
Modified: phpdoc/en/trunk/language/types/float.xml
===================================================================
--- phpdoc/en/trunk/language/types/float.xml 2011-12-03 15:43:53 UTC (rev 320309)
+++ phpdoc/en/trunk/language/types/float.xml 2011-12-03 18:43:05 UTC (rev 320310)
@@ -88,6 +88,22 @@
</para>
</sect2>
+
+ <sect2 xml:id="language.types.float.nan">
+ <title>NaN</title>
+ <para>
+ Some numeric operations can result in a value represented by the constant
+ <constant>NAN</constant>. 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;.
+ </para>
+ <para>
+ Because <constant>NAN</constant> represents any number of different values,
+ <constant>NAN</constant> should not be compared to other values, including
+ itself, and instead should be checked for using <function>is_nan</function>.
+ </para>
+ </sect2>
</sect1>
<!-- Keep this comment at the end of the file