Re: How random is random number?
Re: How random is random number?
- Subject: Re: How random is random number?
- From: Christopher Nebel <email@hidden>
- Date: Mon, 8 Jul 2002 19:54:13 -0700
On Monday, July 8, 2002, at 06:32 PM, Stephen Swift wrote:
Also, while on the subject of numbers I have a question concerning
integers
larger than 536870909. AS doesn't seem to convert the number to an
exponent
until 536870912. And I received some on results when working up there:
536870909 + 3
--> -536870912
536870909 + 4
--> -536870911
536870909 + 5
--> -536870910
That bug was fixed about two years ago back in 1.5.5.
The range for AppleScript integers is -2^29 ... 2^29 - 1. (This is in
the Language Guide, except that it claims the range is +/- 2^29 - 3.
I'm not sure where that came from.) What's supposed to happen is that
if you add two integers and come up with a result that's outside that
range, AppleScript will promote the result to a real number and return
that. AppleScript 1.3 and 1.4, however, have a bug that makes such
results overflow into a very negative number.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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.