Namespaces
Variants
Views
Actions

std::nan, std::nanf, std::nanl

From cppreference.com
< cpp‎ | numeric‎ | math
Revision as of 15:36, 14 November 2011 by Cubbi (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:cpp/numeric/math/sidebar Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <cmath>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td >
float nanf( const char* arg );
</td>

<td class="t-dcl-nopad"> </td> <td > Template:mark c++11 feature </td> </tr> <tr class="t-dcl ">

<td >
double nan( const char* arg );
</td>

<td class="t-dcl-nopad"> </td> <td > Template:mark c++11 feature </td> </tr> <tr class="t-dcl ">

<td >
long double nanl( const char* arg );
</td>

<td class="t-dcl-nopad"> </td> <td > Template:mark c++11 feature </td> </tr> Template:ddcl list end

Converts the implementation-defined character string arg into the corresponding quiet NaN value. The call Template:cpp is equivalent to the call Template:cpp.

Parameters

arg - narrow character string identifying the contents of a NaN, or an empty string

Return value

The NaN value that corresponds to the identifying string arg or zero if the implemntation does not support quiet NaNs.

See also

Template:cpp/numeric/math/dcl list isnanTemplate:cpp/string/narrow/dcl list strtof
[static]
returns a quiet NaN value of the given floating-point type
(public static member function of std::numeric_limits<T>) [edit]