View Single Post
Old 2014-02-10, 01:45   #3
daxmick
 
daxmick's Avatar
 
Feb 2014

22·3·7 Posts
Default

Quote:
Originally Posted by Mini-Geek View Post
There are an infinite number of primes. What are you really trying to do?

I know that, hence the quotes around "all". My goal is just to start accumulating the primes starting with 2 and going forward till I can no longer go! No real reason other than just to do it.

In practice, you might have bottlenecks for various reasons. In the specific context of using GMP, it shouldn't matter much which you use, since I'd assume the bulk of the work is done in the GMP library's code, not in yours.
That is what I figured too. However, I came across something interesting about PHP GMP. (Damn, I can't find the URL I was reading or I'd post it here.) Anyway, the info was something to the effect that PHP's GMP can only handle 2^31 digits until their new code comes out and then it will be 2^63 digits. (It could have been an old post too bear in mind.)

Not that I plan on reaching either of those limits any time soon but I hadn't seen those limitations in C. Just saying.
daxmick is offline   Reply With Quote