a numeric bug.
a numeric bug.
- Subject: a numeric bug.
- From: deivy petrescu <email@hidden>
- Date: Wed, 14 Sep 2005 21:44:35 -0400
There is a problem with AS it is not system wide, but it also happens
with Smile.
Check this script
<script>
set lista to {}
repeat with j from 0 to 23
set end of lista to 10 ^ j mod 7
end repeat
lista
-- {1.0, 3.0, 2.0, 6.0, 4.0, 5.0, 1.0, 3.0, 2.0, 6.0, 4.0, 5.0, 1.0,
3.0, 2.0, 6.0, 4.0, 5.0, 1.0, 3.0, 2.0, 6.0, 4.0, 1.0}
Well, it looks like the last "1.0" should be a "5.0" (count by 6).
And it should!
bc gets it right. So it is not a problem with the system.
Further checking indicates that every power *after* 23 gets it wrong
as well. And this is not only for 7, but for all the other numbers I
checked (primes only).
I don't get it. 10^23 is way below AS numeric limit (which I believe
is over 10^300).
There is something very wrong with the way AS deals with numbers.
deivy
_______________________________________________
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