Compartilhar via


numeric_limits::signaling_NaN

Retorna a representação de sinalizar não é um número (NAN) para o tipo.

static Type signaling_NaN( ) throw( );

Valor de retorno

A representação de um NAN de sinalização do tipo.

Comentários

O valor de retorno será significativo somente se has_signaling_NaN é true.

Exemplo

// 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;
}

Saída de Exemplo

O seguinte é saída em 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

Requisitos

limites <deCabeçalho: >

Namespace: std

Consulte também

Referência

Classe strstreambuf