返回表示浮点类型可以为受限值的最大正值整数索引,则基本基数引发对该功能时。
static const int max_exponent = 0;
返回值
最大整数基数的指数可以由可用类型。
备注
成员函数返回为浮点类型才有意义的。 max_exponent 是 浮动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;
}
要求
页眉: <限制>
命名空间: std