mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Software (https://www.mersenneforum.org/forumdisplay.php?f=10)
-   -   MISSING A FEATURE IN PFGW (https://www.mersenneforum.org/showthread.php?t=27129)

Cybertronic 2021-09-09 08:29

MISSING A FEATURE IN PFGW
 
Hello PFGW programmers !


[SIZE=+1][FONT=Arial]Is it possible to create a special PFGW for me ?[/FONT][/SIZE]
[SIZE=+1][FONT=Arial]I need a feature, that PFGW write only numbers in pfgw.log, if ALL conditions are 3-PRP ![/FONT][/SIZE]
[SIZE=+1][FONT=Arial]Example:[/FONT][/SIZE]
[SIZE=+1][FONT=Arial]ABC $a+0 & [/FONT][/SIZE][SIZE=+1][FONT=Arial][SIZE=+1][FONT=Arial]$a+2 & [/FONT][/SIZE][/FONT][/SIZE][SIZE=+1][FONT=Arial]$a+6 & [/FONT][/SIZE][SIZE=+1][FONT=Arial]$a+12 [/FONT][/SIZE][SIZE=+1][FONT=Arial][SIZE=+1][FONT=Arial]& [/FONT][/SIZE][SIZE=+1][FONT=Arial][SIZE=+1][FONT=Arial]$a+14 & [/FONT][/SIZE][/FONT][/SIZE][SIZE=+1][FONT=Arial]$a+20 & [/FONT][/SIZE][SIZE=+1][FONT=Arial]$a+24 [/FONT][/SIZE][/FONT][/SIZE][SIZE=+1][FONT=Arial][SIZE=+1][FONT=Arial][SIZE=+1][FONT=Arial][SIZE=+1][FONT=Arial]& [/FONT][/SIZE][SIZE=+1][FONT=Arial]$a+26[/FONT][/SIZE][/FONT][/SIZE][/FONT][/SIZE][/FONT][/SIZE]
[SIZE=+1][FONT=Arial]281809744377742937[/FONT][/SIZE]
[SIZE=+1][FONT=Arial]280807944730632017[/FONT][/SIZE]
[SIZE=+1][FONT=Arial]276808166894198957
[/FONT][/SIZE]
[SIZE=+1][FONT=Arial]....
[/FONT][/SIZE]
[SIZE=+1][FONT=Arial]pfgw.log Output-File
[/FONT][/SIZE]
[SIZE=+1][FONT=Arial]276808166894198957[/FONT][/SIZE]
[SIZE=+1][FONT=Arial]I need it so urgent :-)[/FONT][/SIZE]
[SIZE=+1][FONT=Arial]regards[/FONT][/SIZE]
[SIZE=+1][FONT=Arial]Norman
[/FONT][/SIZE]

paulunderwood 2021-09-09 11:39

That syntax would clash with:

[QUOTE]you can also search for an expression only if all the previous expressions
were prime (again a chain of up to 20 expressions (now 250 expressions) may be tested):

ABC $a*$b^$c+1 & $a*$b^$c-1
1 2 5000
1079 2 4567
2842 3 3210
612 2 4321
48207 2 400
[/QUOTE]

You could always write a GMP program to do this, or even PARI/GP

kar_bon 2021-09-09 11:59

Use awk (gawk for WIN):

create file list.awk with code:
[code]
BEGIN {line=$0}
{
if (index($0,"Complete Set"))
print substr(line,1,index(line,"+")-1)
line=$0
}
[/code]

and call this with
[code]
gawk -f list.awk pfgw.out
[/code]
processing the PFGW output file with this script.

Your example will output only one line with 276808166894198957.

PS: For redirecting the output call
[code]
gawk -f list.awk pfgw.out >out.txt
[/code]
in a separate file.

Cybertronic 2021-09-09 12:27

@kar_bon
This is what I do, but PFGW should be only write a minimum to pfgw.log...only $a's for passing all conditions.


(Also das mache ich ja , aber PFGW schreibt zu viel bei kleinen Zahlen auf die Festplatte, soll aber nur dann in die pfgw.log schreiben, wenn alle Bedingungen erfüllt sind.)

henryzz 2021-09-09 14:19

This would be a nice feature but far from necessary as there are workarounds. If I recall correctly the code implementing this sort of thing is a mess in PFGW and rogue has avoided playing with it much.


I personally just grep for the last form. If you wanted to avoid the large output you could write a pfgw script.

rogue 2021-09-09 15:25

The pfgw code is messy. It uses (and abuses) many C++ features. My intent is to rewrite it in the future so that it is easier for me to support. Whether or not I ever get around to it is a separate question as it will require a lot of planning.

Cybertronic 2021-09-09 16:15

Can I hope for it ?


Maybe with "pfgw64 -N -f0 -oac input.txt" or so. oac = only all conditions

rogue 2021-09-09 17:18

[QUOTE=Cybertronic;587574]Can I hope for it ?


Maybe with "pfgw64 -N -f0 -oac input.txt" or so. oac = only all conditions[/QUOTE]

Not in the near future.


All times are UTC. The time now is 13:53.

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