• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
JSA -- now I believe this is a bug (JSA or AS)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JSA -- now I believe this is a bug (JSA or AS)


  • Subject: JSA -- now I believe this is a bug (JSA or AS)
  • From: Deivy Petrescu <email@hidden>
  • Date: Wed, 17 Dec 2014 21:17:05 -0500

This:
Math.tan((Math.PI)/3)
—> 1.7320508075688767  (sqrt(3))

Is correct when run from JSA
This is not:

set k to run script "Math.tan((Math.PI)/3)" in “Javascript”
k
(*
tell current application
	run script "Math.tan((Math.PI)/3)" in "Javascript"
end tell
Result:
1
*)

the problem happens with all trig functions.

No, it does not work with degrees either

set k to run script "Math.tan(45)" in "Javascript”
k
—> 1
"Great! It works"

set k to run script "Math.tan(30)" in "Javascript”
k
—> -6
Nah, it doesn’t!!

Other functions seem to work. The ones that “don’t do elaborate calculations"

Math.ln() seems to truncate the result to integer


The functions work correctly on the JSA side

Deivy Petrescu
email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


  • Follow-Ups:
    • Re: JSA -- now I believe this is a bug (JSA or AS)
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: OSAScriptController's stopScript action
  • Next by Date: Re: JSA -- now I believe this is a bug (JSA or AS)
  • Previous by thread: Re: OSAScriptController's stopScript action
  • Next by thread: Re: JSA -- now I believe this is a bug (JSA or AS)
  • Index(es):
    • Date
    • Thread