numeric_limits::max_exponent10
Returns the maximum positive integral exponent that the floating-point type can represent as a finite value when a base of ten is raised to that power.
static const int max_exponent10 = 0;
Valeur de retour
The maximum integral base 10 exponent representable by the type.
Notes
The member function return is meaningful only for floating-point types. max_exponent est la valeur FLT_MAX_10 pour le type flottant.
Exemple
// numeric_limits_max_exponent10.cpp
// compile with: /EHsc
#include <iostream>
#include <limits>
using namespace std;
int main( )
{
cout << "The maximum base 10 exponent for type float is: "
<< numeric_limits<float>::max_exponent10
<< endl;
cout << "The maximum base 10 exponent for type double is: "
<< numeric_limits<double>::max_exponent10
<< endl;
cout << "The maximum base 10 exponent for type long double is: "
<< numeric_limits<long double>::max_exponent10
<< endl;
}
Configuration requise
En-tête: <limites>
Espace de noms : std