use scientific notation if you need very large numbers. otherwise, you are dealing with some kind of design flaw because computers are not meant to manage that many entities.
That's a really, really huge number. Why do you need such huge integers?
Usually, you use floating point values for very large quantities. It doesn't have as much precision in the integer portion as a long integer, but since it has an exponent, you can scale it very large.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
on a side note... to me that's a bit overkill. Computers are not as all powerful as people think and dealing with numbers that large is rarely needed.
here's something that very few people know... if you were to plot 100 cities on a map of the united states... do you realize that there is not a computer in the world that could calculate the shortest path that a person could take to hit all 100 cities? its true.
actually computers could eventually find it, but it would take weeks or even months of processing because there are so many trillions of calculations needed to find it.
sorry, this post just reminded me of that fact. And I am just curious to know why the original poster feels he needs numbers that large.
on a side note... to me that's a bit overkill. Computers are not as all powerful as people think and dealing with numbers that large is rarely needed.
here's something that very few people know... if you were to plot 100 cities on a map of the united states... do you realize that there is not a computer in the world that could calculate the shortest path that a person could take to hit all 100 cities? its true.
actually computers could eventually find it, but it would take weeks or even months of processing because there are so many trillions of calculations needed to find it.
sorry, this post just reminded me of that fact. And I am just curious to know why the original poster feels he needs numbers that large.
Sure. The "traveling salesman" problem. A classic in computer science.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
I've developed an algorithm for calculating primes, and I was planning having the app run for a year or so. Soo, it would end up finding some pretty huge numbers (:
I've developed an algorithm for calculating primes, and I was planning having the app run for a year or so. Soo, it would end up finding some pretty huge numbers (:
First of all, compute-intensive applications like that are not very suitable for mobile devices. Your desktop computer, whatever it is, would be much more appropriate. Second, really big prime numbers like the ones used in RSA encryption are not found deterministically. They are found probabilistically. Look up "primality testing", especially the Miller-Rabin method, for more info.