numeric_limits::infinity
Varsa bir türü için pozitif sonsuzluk gösterimi.
static Type infinity( ) throw( );
Dönüş Değeri
Varsa bir türü için pozitif sonsuzluk gösterimi.
Notlar
Dönüş değeri anlamlı yalnızca has_infinity olan doğru.
Örnek
// numeric_limits_infinity.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << numeric_limits<float>::has_infinity <<endl;
cout << numeric_limits<double>::has_infinity<<endl;
cout << numeric_limits<long double>::has_infinity <<endl;
cout << numeric_limits<int>::has_infinity <<endl;
cout << numeric_limits<__int64>::has_infinity <<endl;
cout << "The representation of infinity for type float is: "
<< numeric_limits<float>::infinity( ) <<endl;
cout << "The representation of infinity for type double is: "
<< numeric_limits<double>::infinity( ) <<endl;
cout << "The representation of infinity for type long double is: "
<< numeric_limits<long double>::infinity( ) <<endl;
}
Gereksinimler
Başlık: <limits>
Namespace: std