View Single Post
Old 2021-01-28, 23:57   #1
Viliam Furik
 
"Viliam Furík"
Jul 2018
Martin, Slovakia

10101001012 Posts
Default Prime representing constant program for calculation of the digits

Hello, not so long ago I have posted in the y-cruncher subforum about a program for the Prime representing constant (PRC). Since then I have developed quite a fast program, thanks to the help of casevh, author of gmpy2 library, and successfully computed 1 billion (109) digits of PRC. I have also finally managed to figure out how to parallelize the algorithm, but that led me to another problem...

Next big milestone after 109 digits is 1012. That requires 1 TB of disk space to contain all digits in a text file (or less if any compression is used), computing through primes up to about 2,5 * 1012, basically the same amount of RAM (that problem has a solution - writing the intermediary numbers to disk, and reading them from there, as y-cruncher does, or at least how I understand it does it), but most importantly, it needs to be able to sieve out the primes themselves. Storing 2,5 * 1012 bits in RAM would require about 300 GB of RAM space, which is too much for what I seek. Sieving them in a file would bring up a lot of hassle with making a procedure that could do such thing and another that can read the actual values from there.

These might not be extremely hard problems, but there may be easier ways to do this. So I would like to ask, whether anyone can help with some idea on how to effectively handle such gigantic sized numbers and amounts of data.


BTW, I am also thinking about making it into a GPU program, it could play nicely with TF high-performing GPUs (basically INT32), as the primes are not that big, compared to the blob of prime jelly that is being computed. If somebody has some ideas about this too, I will be grateful for any advice.

BTW2: Are there any volunteers who would like to test the upcoming C version of the code? It will have the multi-core computation implemented in it.

Last fiddled with by Viliam Furik on 2021-01-29 at 12:49
Viliam Furik is offline   Reply With Quote