# Thread: Named Variables and Exponents

1. Member
Join Date
Sep 2009
Posts
4
Rep Power
0

## Named Variables and Exponents

Hi

The formula I want to use is:

= 35.74 + 0.6215T - 35.75V (**0.16) + 0.4275TV(**0.16)

In the formula, V is in the wind speed in statute miles per hour, and T is the temperature in degrees Fahrenheit.

In the formula, ** means the following term is an exponent (i.e. 10**(0.5 ) means 10 to the 0.5 power, or the square root of V)

So I am unsure how to create this

windchill = 35.74
+ 0.6215*(temp32 * 1.8 + 32)
- 35.75*windSpeed * 10e0.16
+ 0.4275*(temp32 * 1.8 + 32)* windSpeed * 10e0.16;

But Java complains about not being a statement and want ( or ) or ;

Thanks

Many thanks

2. Member
Join Date
Sep 2009
Posts
4
Rep Power
0
Just found the formula listed as

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

3. Member
Join Date
Sep 2009
Posts
4
Rep Power
0
Thank you.

Not sure what you mean, but the code I have written is

windchill = 35.74
+ 0.6215*(temp32 * 1.8 + 32)
- 35.75*windSpeed * 10e0.16
+ 0.4275*(temp32 * 1.8 + 32)* windSpeed * 10e0.16;

4. Senior Member
Join Date
Aug 2009
Posts
2,388
Rep Power
7
Post the full code that you tried to compile.

5. Member
Join Date
Sep 2009
Posts
4
Rep Power
0
Got it working now thanks

if (temp32f <= 50 && windSpeed > 3)
{
windchill =
35.74
+ 0.6215 * temp32f
- 35.75 * Math.pow (windSpeed,0.16)
+ 0.4275 * temp32f * Math.pow (windSpeed,0.16);

} else

{
windchill = 0;
}

Thanks for helping

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•