#include #include #include //for numeric_limits #include //for pow using namespace std; int main() { const double radix = numeric_limits::radix; double m = (1.0 - pow(radix, -numeric_limits::digits)) * pow(radix, numeric_limits::max_exponent - 1); m *= radix; if (m == numeric_limits::max()) { cout << fixed << m << "\n"; //fixed prevents rounding } return EXIT_SUCCESS; }