numeric_limits::denorm_min

返回最小的非零denormalized值。

static Type denorm_min( ) throw( );

返回值

最小非零denormalized值。

备注

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