• 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: Convert long number to string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert long number to string


  • Subject: Re: Convert long number to string
  • From: Doug McNutt <email@hidden>
  • Date: Mon, 19 Apr 2004 07:53:10 -0600

At 12:37 +0100 4/19/04, Nigel Garvey wrote:
>.... or accurate:
>
> 1 as miles as inches
> --> inches 6.33599999036808E+4

The correct answer is 63360 ( = 5280 * 12) exactly. Applescript's answer is in error in the tenth decimal place and ought to be accurate to the 14th place even if decimal fractions were involved. (And they are not.)

63360 does not even exceed the capacity of a 16 bit unsigned integer, let alone that of a 32 bit int.

Using the NIST value for a mile to meter conversion based on the survey foot I get 6.33599913900000E+04 if I use 39.37 inches to a meter. (Wrong since 1959; there are 25.4 cm in an inch.)

<http://physics.nist.gov/Pubs/SP811/appenB8.html>
<http://physics.nist.gov/Pubs/SP811/appenB.html#B.6>

But then, in Applescript, (-x^2-y^2) is not the same as (-y^2-x^2) either.

1 as statute miles as inches -- Expected class name but got identifier
1 as survey foot as meters -- same.

--

Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: Convert long number to string (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: Language issue
  • Next by Date: Re: backup
  • Previous by thread: Re: Convert long number to string
  • Next by thread: Re: Convert long number to string
  • Index(es):
    • Date
    • Thread