Is there a way of storing very large integers such as 317584931803? Or will I have to find a work around for it?
What do you need to do with such large numbers?
The problem with using 64 bit ints is if you have to multiply a few of
them together. They will overflow. What you want in this case is decimal numbers where each digit takes one byte. The old IBM 360 had decimal math in hardware.
But today, there are libraries that will handle arbitrarily long numbers up to many thousands of digits. One example is the one inside "bc" In the example below I divide two very large numbers and show the result with 100 digits of precision. I've tried using 1,000,000 digits and that works too. took about 1/2 second to compute on my system.
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
scale=100
58472623758697896785747375868979708908968574364758569790848567463764 / 3374858697857463647657897867463647586890896746353758798
17325947245085.95533113891021018132316244477988782887003468551702952\
40688227458861161364260222872968621624114609019
As a last resort you could always pas the numbers off to "bc". it can do math with numbers up to any size so long as they fit in memory. I'm pretty sure bc ships with mac OSX but you are best off using bs's internal library to do the work