• 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: What is this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is this?


  • Subject: Re: What is this?
  • From: Doug McNutt <email@hidden>
  • Date: Mon, 28 Feb 2005 16:34:23 -0700

OS 9.1, SE  1.8.3

1 * (item 2 of "2048") --> 0
1 * (item 2 of "4096") --> 0
1 * (item 2 of "8192") --> 1
1 * (item 2 of "16384") --> 6
1 * (item 2 of "32768") --> 2
1 * (item 2 of "49152") --> 9
1 * (item 2 of "65536") --> 5
1 * (item 2 of (2 ^ 13 as text)) --> 1

set alist to {}
repeat with jill from 10 to 16
	set res to 1 * (item 2 of (2 ^ jill as text))
	set alist to alist & res
end repeat
list
-->  "Cant make "." into a number"
Sigh

set alist to {}
repeat with jill from 1 to 32
	set res to 1 * (item 2 of ((jill * (2 ^ 13)) as text))
	set alist to alist & res
end repeat

--> {1, 6, 4, 2, 0, 9, 7, 5, 3, 1, 0, 8, 0, 1, 2, 3, 3, 4, 5, 6, 7, 8, 8, 9, 0, 1, 2, 2, 3, 4, 5, 6}

But there seems to be something magic about 2^12 and that matches up pretty well with a bad interpretation of an IEEE float with an 11 bit exponent biased by 2048. Is item 2 perhaps the exponent or something incorrectly perceived as such?

--

--> From the U S of A, the only socialist country that refuses to admit it. <--
 _______________________________________________
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

References: 
 >Re: What is this? (From: kai <email@hidden>)

  • Prev by Date: Re: *Very* strange script / global variable behavior
  • Next by Date: Re: Removing html tags
  • Previous by thread: Re: What is this?
  • Next by thread: Re: What is this?
  • Index(es):
    • Date
    • Thread