Re: Math expression help
Re: Math expression help
- Subject: Re: Math expression help
- From: Luther Fuller <email@hidden>
- Date: Tue, 9 May 2006 18:33:42 -0500
Okay let's try something simple.....
set HA to 256.84 * 3.1415926535 / 180 --in radians
set Dec to 29.82 * 3.1415926535 / 180 --in radians
set x to cos HA * (cos Dec)
display dialog "x " & x
set x1 to cos (HA)
set x2 to cos (Dec)
set done to x1 * x2
set x to x1 * x2
display dialog "x " & x
As you can see very different results........ what is going on
here..... what am I missing! Besides the editor really likes to
throw in parenthesis when I compile the script!
Taking off my AppleScripter's hat and putting on my mathematician's
hat (I have one), I notice that neither I nor the editor know what
you mean by
set x to cos HA * (cos Dec)
The editor thinks you mean
set x to cos (HA * (cos Dec))
but the rest of your code indicates that you really want
set x to (cos HA) * (cos Dec)
My advice, both as an AppleScripter and a mathematician is ... If in
doubt, use lots & lots of parenthesis!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden