mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Documented NaN behaviour. Closes bug #60346.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@320310 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
637431c7cf
commit
3f82f09927
1 changed files with 16 additions and 0 deletions
|
@ -88,6 +88,22 @@ EXPONENT_DNUM [+-]?(({LNUM} | {DNUM}) [eE][+-]? {LNUM})
|
|||
</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
|
||||
|
|
Loading…
Reference in a new issue