Long double overflows but value smaller than maximum representable value
问题 I'm trying to compute a series using C++. The series is: (for those wondering) My code is the following: #include <iostream> #include <fstream> #include <cmath> // exp #include <iomanip> //setprecision, setw #include <limits> //numeric_limits (http://en.cppreference.com/w/cpp/types/numeric_limits) long double SminOneCenter(long double gamma) { using std::endl; using std::cout; long double result=0.0l; for (long double k = 1; k < 1000 ; k++) { if(isinf(pow(1.0l+pow(gamma,k),6.0l/4.0l))) { cout