c3
2010-09-11 15:29:23 UTC
//convert inputs from integers to doubles
static_cast
static_cast
static_cast
//calculate heat index
HEATINDEX = (-42.379) + (2.04901523 * airTemp) + (10.1433127 * relHumidity)
- (0.22475541 * airTemp * relHumidity)
- (6.83783 * pow(10.0, -3)) * double pow(airTemp, 2)
- ((5.481717 * pow(10.0, -2)) * double pow(relHumidity, 2))
+ ((1.22874 * pow(10.0, -3)) * pow(airTemp, 2) * relHumidity)
+ ((8.5282 * pow(10.0, -4)) * airTemp * double pow(relHumidity, 2))
- (1.99 * pow(10.0, -6)) * double pow(airTemp, 2) * double pow(relHumidity, 2);
When I try to compile it, it comes up with:
heatindex.cpp(74): error C2062: type 'double' unexpected
with line 74 being:
- (6.83783 * pow(10.0, -3)) * double pow(airTemp, 2)
How can I fix this?