Re: BIG Numbers
Re: BIG Numbers
- Subject: Re: BIG Numbers
- From: Richard 23 <email@hidden>
- Date: Mon, 13 Nov 2000 00:31:32 -0800
>
How big can numbers get when using integers and math w/applescript?
>
>
I need to add up bytes in files until I have enough to burn to a DVD.
Since 4294967296 compiles to 0, I'd have guessed that's the limit.
But if you use scientific notation you can go a lot higher.
I couldn't get a number bigger than
1.797693134862E+308 or smaller than the inverse.
Just be careful about that magic number. If you hit it just right your
large number will turn into a large negative number.
If you try the this script, it craps out a lot earlier then it should:
set {theNum, theVal} to {0, 1}
repeat while theVal > 0
set theNum to theNum + theVal
set theVal to result
log result
end repeat
(*1*)
(*2*)
(*4*)
(*8*)
...
(*268435456*)
(*-536870912*)
nice, huh?
R23