返回浮点类型可以表示为受限的值的最大正值集成指数,当基数底数的该功能不变。
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;
}
要求
标头: <limits>
命名空间: std