Hi Mumus
Firstly I am a noob in programming c and, since I wanted to learn, I though "what the hell, might as well try this"
So I am trying to understand you code and algorithm and came on a possible error. I think I am using V5
At the end of the bool CSieveOfEratosthenes::Weave()
you have
{
const unsigned long lCompositeCunningham1 = pCompositeCunningham1A | pCompositeCunningham1B;
const unsigned long lCompositeCunningham2 = pCompositeCunningham2A | pCompositeCunningham2B;
const unsigned long lCompositeBiTwin = pCompositeCunningham1A | pCompositeCunningham2A;
pCandidateBiTwin = ~lCompositeBiTwin;
pCandidateCunningham1 = ~lCompositeCunningham1;
pCandidates = ~(lCompositeCunningham1 & lCompositeCunningham2 & lCompositeBiTwin);
}
The way that I see it is you do not have a "pCandidateCunningham2 = ~lCompositeCunningham2;" This means in my opinion that you are not checking for the second series.
Is this correct?
This code was taken from the primecoin client optimized by mikaelh published on
https://bitcointalk.org/index.php?topic=255782.0, where he did a very nice job optimizing the code.
I didn't took the time yet to fully understand what exactly he did there. I guess it's better to ask him directly. In any case I will also check if what you wrote is correct.
Thanks,
M