mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2013-04-09, 02:57   #1
davar55
 
davar55's Avatar
 
May 2004
New York City

5×7×112 Posts
Default hex res question

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?
davar55 is offline   Reply With Quote
Old 2013-04-09, 03:22   #2
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

9,497 Posts
Default

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.
Batalov is offline   Reply With Quote
Old 2013-04-09, 03:27   #3
axn
 
axn's Avatar
 
Jun 2003

5,087 Posts
Default

Quote:
Originally Posted by davar55 View Post
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?
Since you ran it on a known mersenne prime, please analyze the code to see why it is not reporting it as prime. The logic is that the _whole result_ must be zero for it to be declared prime, not just the least significant <however-many> bits.

EDIT:- Serge said it best

Last fiddled with by axn on 2013-04-09 at 03:29
axn is offline   Reply With Quote
Reply

Thread Tools


All times are UTC. The time now is 22:08.


Fri Aug 6 22:08:21 UTC 2021 up 14 days, 16:37, 1 user, load averages: 3.86, 3.31, 2.94

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.