Namespaces
Variants
Views
Actions

nan, nanf, nanl

From cppreference.com
< c‎ | numeric‎ | math
Revision as of 20:59, 2 March 2013 by 74.104.151.109 (Talk)

 
 
 
Common mathematical functions
Functions
Basic operations
(C99)
(C99)
(C99)
(C99)
(C99)
nannanfnanl
(C99)(C99)(C99)
Exponential functions
(C99)
(C99)
(C99)
(C99)
Power functions
(C99)
(C99)
Trigonometric and hyperbolic functions
(C99)
(C99)
(C99)
Error and gamma functions
(C99)
(C99)
(C99)
(C99)
Nearest integer floating point operations
(C99)(C99)(C99)
(C99)
(C99)(C99)(C99)
Floating point manipulation functions
(C99)(C99)
(C99)
(C99)
Classification
(C99)
(C99)
(C99)
Macro constants
 

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <math.h>
</td>

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

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

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> <tr class="t-dcl ">

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

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> <tr class="t-dcl ">

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

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> Template:ddcl list end

Converts the implementation-defined character string arg into the corresponding quiet NaN value. The call std::nan("string") is equivalent to the call std::strtod("NAN(string)", (char**)NULL);.

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:c/numeric/math/dcl list isnan
C++ documentation for nanf, nan, nand