numeric_limits::signaling_NaN

Returns the representation of a signaling not a number (NAN) for the type.

static Type signaling_NaN( ) throw( );

Return Value

The representation of a signaling NAN for the type.

Remarks

The return value is meaningful only if has_signaling_NaN is true.

Example

// numeric_limits_signaling_nan.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>

using namespace std;

int main( )
{
   cout << "The signaling NaN for type float is:  "
        << numeric_limits<float>::signaling_NaN( )
        << endl;
   cout << "The signaling NaN for type int is:  "
        << numeric_limits<int>::signaling_NaN( )
        << endl;
   cout << "The signaling NaN for type long double is:  "
        << numeric_limits<long double>::signaling_NaN( )
        << endl;
}

Sample Output

The following is output on x86.

The signaling NaN for type float is:  1.#QNAN
The signaling NaN for type int is:  0
The signaling NaN for type long double is:  1.#QNAN

Requirements

Header: <limits>

Namespace: std

See Also

Concepts

strstreambuf Class

numeric_limits Members