numeric_limits::max_exponent

基数の基本クラスがその累乗と浮動小数点型が有限の値として表すことができる最大の正の整数の指数を返します。

static const int max_exponent = 0;

戻り値

型で表現できる最大の必要な基数ベースの指数。

解説

メンバー関数の戻り値が浮動小数点型に対してのみ意味を持ちます。max_exponent は **[float]**型の値 FLT_MAX_EXP です。

使用例

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

using namespace std;

int main( )
{
   cout << "The maximum radix-based exponent for type float is:  "
        << numeric_limits<float>::max_exponent
        << endl;
   cout << "The maximum radix-based exponent for type double is:  "
        << numeric_limits<double>::max_exponent
        << endl;
   cout << "The maximum radix-based exponent for type long double is:  "
        << numeric_limits<long double>::max_exponent
        << endl;
}
  

必要条件

ヘッダー: <limits>

名前空間: std

参照

関連項目

strstreambuf Class