• 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: BIG Numbers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Batch Processing made easy
  • Next by Date: Re: Automate zip archives
  • Previous by thread: Re: BIG Numbers
  • Next by thread: Re: BIG Numbers
  • Index(es):
    • Date
    • Thread