Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

translating javasript formula to perl code

Status
Not open for further replies.

webscripter

Programmer
Jul 29, 2002
266
US
Hi everyone,

I have a wind chill formula that uses exponential notation, which I'm new to. Can someone tell me how to write t his equation in perl.

windchill=(13.12+0.6215*temp-11.37*Math.pow(wind,0.16)+0.3965*temp*Math.pow(wind,0.16));



Thanks
Pat
ideas@microwebber.com
 
Your formula looks something like this:

Code:
$windchill = 13.12 + (0.6215 * $temp) - (11.37 * ($wind ** 0.16)) + (0.3965 * $temp * ($wind ** 0.16));

However, I must be missing something. I looked around a bit and NOAA/NWS has a different formula for calculating wind chill that looks something like this:

Code:
$windchill = 35.74 + (0.6215 * $temp) - (35.75 * ($wind ** 0.16)) + (0.4275 * $temp * ($wind ** 0.16));
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top