numeric_limits::denorm_min

最小の正規化非ゼロ以外の値を返します。

static Type denorm_min( ) throw( );

戻り値

最小の正規化非ゼロ以外の値。

解説

long double は C++ コンパイラの double と同じです。

関数は has_denormdenorm_presentと等しく [最小値] と同じである型の最小値を返します。

使用例

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

using namespace std;

int main( )
{
   cout << "The smallest nonzero denormalized value\n for float "
        << "objects is: " << numeric_limits<float>::denorm_min( ) 
        << endl;
   cout << "The smallest nonzero denormalized value\n for double "
        << "objects is: " << numeric_limits<double>::denorm_min( ) 
        << endl;
   cout << "The smallest nonzero denormalized value\n for long double "
        << "objects is: " << numeric_limits<long double>::denorm_min( ) 
        << endl;

   // A smaller value will round to zero
   cout << numeric_limits<float>::denorm_min( )/2 <<endl;
   cout << numeric_limits<double>::denorm_min( )/2 <<endl;
   cout << numeric_limits<long double>::denorm_min( )/2 <<endl;
}
  

必要条件

ヘッダー: <limits>

名前空間: std

参照

関連項目

strstreambuf Class