Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

numeric_limits::has_quiet_NaN

Tests whether a type has a representation for a quiet not a number (NAN), which is nonsignaling.

static const bool has_quiet_NaN = false;

Return Value

true if the type has a representation for a quiet NAN; false if not.

Remarks

A quiet NAN is an encoding for not a number, which does not signal its presence in an expression. The return value is true if is_iec559 is true.

Example

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

using namespace std;

int main( )
{
   cout << "Whether float objects have quiet_NaN: "
        << numeric_limits<float>::has_quiet_NaN 
        << endl;
   cout << "Whether double objects have quiet_NaN: "
        << numeric_limits<double>::has_quiet_NaN 
        << endl;
   cout << "Whether long int objects have quiet_NaN: " 
        << numeric_limits<long int>::has_quiet_NaN 
        << endl;
}

Output

Whether float objects have quiet_NaN: 1
Whether double objects have quiet_NaN: 1
Whether long int objects have quiet_NaN: 0

See Also

strstreambuf Class | numeric_limits Members

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.