View Single Post
Old 2020-10-24, 08:40   #39
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

217018 Posts
Default

Quote:
Originally Posted by S485122 View Post
Euh ... to fit in 16 bits it would be 30030 (13#).
Nope. 16 bits can store a number between 0 and 65535. Why should you bother with negatives? In fact, I explicitly mentioned uint32. Please read again. Here "u" in front of "int" stands for "unsigned".
And for the 13# part, you would need to multiply it by 2, because mersenne classes for k need to be multiple of 4 to have q=2kp+1 be 1 or 7 (mod 8), see discussions in this thread. That's why mfaktc uses 4620 classes (2*11#) and not 2310. This way, you can very fast discard half of the filtered candidates (those which are 3 or 5 (mod 8)) without any test (because they will all be in the same class, which you just ignore), getting things done much faster.


Last fiddled with by LaurV on 2020-10-24 at 08:49
LaurV is offline   Reply With Quote