• 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
Re: Informal poll
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Informal poll


  • Subject: Re: Informal poll
  • From: Shane Stanley <email@hidden>
  • Date: Tue, 17 Jun 2014 23:41:38 +1000

On 17 Jun 2014, at 10:49 pm, Emmanuel LEVY <email@hidden> wrote:

I confirm, here again ECMA makes a better job than Apple, look:

callJavaScript (make new _javascript_) script "'_javascript_: pi = ' + Math.PI"
 --  "_javascript_: pi = 3.141592653589793"
"AppleScript: pi = " & pi
 --  "AppleScript: pi = 3.14159265359"

16 vs 12 digits.

I'm not sure that's an accurate comparison. Just because AppleScript coerces a real to a string with 12 digits, doesn't mean the number itself is stored with only 12 digits of precision. You can show that it's not the case fairly easily:

3.14159265359 - pi
--> 2.06945571790129E-13

Or: 

pi * 10000
--> 3.14159265358979E+4

That suggests *possibly* the loss of one digit.

I think there are bigger fish to fry...

(But yes, I agree completely that we shouldn't need to resort to ASObjC or additions for most of the things they're used for.)

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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

References: 
 >Re: Informal poll (From: Nigel Garvey <email@hidden>)
 >Re: Informal poll (From: Emmanuel LEVY <email@hidden>)
 >Re: Informal poll (From: Paul Fidler <email@hidden>)
 >Re: Informal poll (From: Emmanuel LEVY <email@hidden>)

  • Prev by Date: Re: Informal poll
  • Next by Date: Re: Copy text from pdf to TextEdit
  • Previous by thread: Re: Informal poll
  • Next by thread: Re: Informal poll
  • Index(es):
    • Date
    • Thread