# Need help with c++ pow function



## matrim (Dec 28, 2004)

I'm trying to use the pow(double x, double y) function for the following equation:

W = 35.74 + 0.6215t - 35.75 (v0.16) + 0.4275t(v0.16)

which is basically the windchill factor formula. I'm assuming it would be something like:
v = windspd;
y = 0.16;
pow(double v, double y)

No idea really . Help?


----------



## GCDude (Apr 1, 2005)

Windchill (ºF) = 35.74 + 0.6215T - 35.75(V^0.16) + 0.4275T(V^0.16)

Where: T = Air Temperature (F)
V = Wind Speed (mph)
^ = raised to a power (exponential)

you c++ needs to be somethig like:-

double temp;
double windspeed;
double windchill;

temp = 70;
windspeed = 10;

windchill = 35.74 + (0.6215*temp) - (35.75 * (pow(windspeed, 0.16))) + (0.4275*temp*(pow(windspeed,0.16)));


----------



## matrim (Dec 28, 2004)

Thanks for thel help! I was dang close, just had to add some parenthesis.


----------

