mersenneforum.org  

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

Reply
 
Thread Tools
Old 2021-02-28, 08:47   #485
earshot
 
Feb 2021

1 Posts
Default

powmod via script gives me incorrect results when it starts using Generic modular reduction. I was learning using script en scriptify and started by making a Mersenne Prime script. It first checks the candidates by powmod base 3 and when it is successful it runs a complete test. It finds all the Mersenne primes up to 607 but for p>=647 modular reduction is used and incorrect results are generated. Is this a known bug or am I doing something wrong?
earshot is offline   Reply With Quote
Old 2021-04-25, 01:27   #486
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

32×19×23 Posts
Angry

The rep-unit function "r()" prints a lot of extranious spaces after the number.

For example:

Code:
./pfgw64 -f0 -od -q"r(5794777)" | wc
PFGW Version 4.0.1.64BIT.20191203.x86_Dev [GWNUM 29.8]

No factoring at all, not even trivial division
                     
      1       2 5794826

Last fiddled with by paulunderwood on 2021-04-25 at 01:29
paulunderwood is offline   Reply With Quote
Old 2021-04-25, 02:00   #487
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

C7B16 Posts
Default

This works, it gives a file with 5794777 1's:

Code:
./pfgw64 -f0 -od -q"r(5794777)" | tail -c +13 | head -c 5794777 > rep5794777.txt
The number 13 in "tail -c +13" has to be 6 more than the number of digits in 5794777.
ATH is offline   Reply With Quote
Old 2021-10-18, 09:43   #488
Puzzle-Peter
 
Puzzle-Peter's Avatar
 
Jun 2009

22·173 Posts
Default help needed

Dear all,


Norman Luhn (Cybertronic) and I are trying to prove the following number using PFGW:


(520461*2^55931+1)*(43439253939*(520461*2^55931-1)^2-3)+1


there is a file helper.txt which contains
520461*2^55931+1
2584831267



The command we are using is

pfgw -tc -l -hhelper.txt <inputfile>


I tried the following PFGW versions:
Linux Version 3.8.3 64bit
Linux Version 3.7.8 64bit
Windows 4.0.0/1 64bit (Help - About says 4.0.0, onscreen it says 4.0.1)
Windows 3.6.5 32bit and 64bit


All tests run on Intel CPUs



They all gave me "is prime" with an output that looks like this:


Code:
Primality testing (520461*2^55931+1)*(43439253939*(520461*2^55931-1)^2-3)+1 [N-1/N+1, Brillhart-Lehmer-Selfridge]
Running N-1 test using base 5
Running N-1 test using base 13
Running N+1 test using discriminant 29, base 3+sqrt(29)
Calling N-1 BLS with factored part 33.33% and helper 0.02% (100.01% proof)
(520461*2^55931+1)*(43439253939*(520461*2^55931-1)^2-3)+1 is prime! (236.0713s+0.0011s)
Norman can't reproduce the primality on his AMD machines, he only gets Fermat and Lucas - PRP.


We tried to determine what's going on but we can't pinpoint the issue. I have no AMD, he has no Intel machines. Could some people please try and post PFG Version, CPU, OS and result? this test only takes a few minutes to run.


Thanks a lot
Peter
Puzzle-Peter is offline   Reply With Quote
Old 2021-10-18, 09:57   #489
Cybertronic
 
Cybertronic's Avatar
 
Jan 2007
Germany

2×11×19 Posts
Default

Additions:


I get also on a Laptop SONY Vaio Intel processor "Fermat-Lucas-PRP"


PFGW Versions: Very old up to V4.0 32/64bit

OS Windows 10 / Windows 7


command line
pfgw2 -tc -hxyz cs




Output: OS Windows 10 , Ryzen 7 1700 3GHz

Z:\PFGW>pfgw2 -tc -hxyz cs
PFGW Version 1.2.0 for Windows [FFT v23.8]


***WARNING! file cs may have already been fully processed.

Primality testing (520461*2^55931+1)*(43439253939*(520461*2^55931-1)^2-3)+1 [N-1/N+1, Brillhart-Lehmer-Selfridg
Reading factors from helper file xyz
Running N-1 test using base 5
Running N-1 test using base 13
Running N+1 test using discriminant 29, base 3+sqrt(29)
Calling N+1 BLS with factored part 0.02% and helper 0.00% (0.07% proof)
(520461*2^55931+1)*(43439253939*(520461*2^55931-1)^2-3)+1 is Fermat and Lucas PRP! (903.1017s+0.0100s)




xyz:

numbers
520461*2^55931+1
2584831267
Cybertronic is online now   Reply With Quote
Old 2021-10-18, 10:18   #490
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

7·109 Posts
Default

Code:
Puzzle-Peter:
Calling N-1 BLS with factored part 33.33% and helper 0.02% (100.01% proof)
Cybertronic:
Calling N+1 BLS with factored part 0.02% and helper 0.00% (0.07% proof)
The program is doing different tests; the last one is definitely the wrong "tool" for this number, so it is not able to detect the number being prime. But the question remains, why it executes a different tests here…
kruoli is online now   Reply With Quote
Old 2021-10-18, 10:39   #491
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

32×19×23 Posts
Default

Quote:
Originally Posted by Cybertronic View Post
xyz:

numbers
520461*2^55931+1
2584831267
Does xyz contain the word "numbers"?
paulunderwood is offline   Reply With Quote
Old 2021-10-18, 10:47   #492
Cybertronic
 
Cybertronic's Avatar
 
Jan 2007
Germany

2·11·19 Posts
Default

Only this two lines


520461*2^55931+1
2584831267
Cybertronic is online now   Reply With Quote
Old 2021-10-18, 10:57   #493
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

32·19·23 Posts
Default

One thing to try: rename "xyz" to "helper" and run with -hhelper
paulunderwood is offline   Reply With Quote
Old 2021-10-18, 11:00   #494
Cybertronic
 
Cybertronic's Avatar
 
Jan 2007
Germany

2·11·19 Posts
Default

Okay, I will try -hhelper


Other files in use was -hhelper.txt , without success
Cybertronic is online now   Reply With Quote
Old 2021-10-18, 11:08   #495
axn
 
axn's Avatar
 
Jun 2003

5,179 Posts
Default

Code:
~/Desktop/pfgw_linux_4.0.1/distribution$ ./pfgw64 -tc -l -hhelper.txt input.txt 
PFGW Version 4.0.1.64BIT.20191203.x86_Dev [GWNUM 29.8]

Output logging to file pfgw.out
Primality testing (520461*2^55931+1)*(43439253939*(520461*2^55931-1)^2-3)+1 [N-1/N+1, Brillhart-Lehmer-Selfridge]                                    
Reading factors from helper file helper.txt
Running N-1 test using base 5                                                  
Running N-1 test using base 13                                                 
Running N+1 test using discriminant 29, base 3+sqrt(29)                                    
(520461*2^55931+1)*(43439253939*(520461*2^55931-1)^2-3)+1 is prime! (294.1606s+0.0005s)                                    

~/Desktop/pfgw_linux_4.0.1/distribution$ uname -a
Linux R5 5.4.0-88-generic #99-Ubuntu SMP Thu Sep 23 17:29:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

~/Desktop/pfgw_linux_4.0.1/distribution$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

~/Desktop/pfgw_linux_4.0.1/distribution$ lscpu
Model name:                      AMD Ryzen 5 3600 6-Core Processor
axn is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
A possible bug in LLR/PFGW while using GWNUM (no bug in P95) Batalov Software 77 2015-04-14 09:01
PFGW 3.2.0 has been Released rogue Software 94 2010-09-14 21:39
PFGW 3.2.3 has been Released rogue Software 10 2009-10-28 07:07
PFGW 3.2.2 has been Released rogue Software 20 2009-08-23 12:14
PFGW 3.2.1 has been released rogue Software 5 2009-08-10 01:43

All times are UTC. The time now is 20:23.


Sun Nov 28 20:23:47 UTC 2021 up 128 days, 14:52, 0 users, load averages: 1.49, 1.33, 1.22

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.