![]() |
|
|
#1 |
|
May 2004
New York City
5×7×112 Posts |
I have an adapted (in C) version of an LL tester program (CF DWT-FFT).
I ran it on p=216091 (a known Mersenne prime) with n=131072 (fft size). It reported "not a Mersenne prime", but with hexres = 0000000000000000. I was expecting "(number) is a known Mersenne Prime!". Can a hexres of zeroes, which must mean a mersenne, report "no"? I suspect the hexres function, but I haven't analyzed it yet. Any ideas? |
|
|
|
|
|
#2 |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
9,497 Posts |
If you post the code, these questions can be answered.
Without seeing the code, there are a few possibilities: 1. there could be a typo and when the residue == 0, and the logic checks for a wrong condition, e.g. (which is, possibly, the most frequent C error/typo in the world): "if(residue=0) {print "this is a Mersenne prime!"}" (one '=' sign is lost), then the wrong message will be printed. 2. if the full 216091-bit residue is != 0, but the last 64-bits of it == 0, then the message would be correct. But then the calculation has an error in implementation, because for 216091, the final residue should indeed in reality be zero and it is not. 3. For some other input p, the full residue could be != 0, but the last 64-bits of it == 0. With the probability less than 1/264. 4. Some other typos in the code are always possible. Human errors are much more abundant than 1/264. |
|
|
|
|
|
#3 | |
|
Jun 2003
5,087 Posts |
Quote:
EDIT:- Serge said it best Last fiddled with by axn on 2013-04-09 at 03:29 |
|
|
|
|