I've got a problem with returned value by std::pow(). Basically, I have following line in the code:
#include <cmath>
int main()
{
double rate = 1.0033333333333334;
int m = 360;
unsigned int period = 1;
double res = std::pow(rate, -(m-period+1));
}
And res has a value of inf. However, when I paste std::pow(rate, -(m-period+1)) to Visual Studio watch while debugging it has a proper value of 0.30179586515268314. Does anyone know what's the source of this discrepancy?