mersenneforum.org Does NewPGen have a bug?
 Register FAQ Search Today's Posts Mark Forums Read

2020-03-17, 03:02   #12
LaurV
Romulan Interpreter

Jun 2011
Thailand

3·2,861 Posts

Quote:
 Originally Posted by storm5510 Q: How is it possible for NewPGen to flag so many more factors than sr1sieve and both results files be virtually identical?
That's by far not what you claimed first time (which was indeed a "serious allegation", right now you just proved that both programs work correctly, albeit newpgen is much slower).

The answer of your question is very simple, the recorded factors of newpgen start from 2^32, but for srsieve from 1M or so. Both values are customizable. Including for newpgen. For srsieve you have a command line switch (it may be -m, if I remember right?) and for newpgen is a bit more complicate (but yes, it can print all factors from a million too).

In fact, you started with 300001 candidates (from 350k to 650k, inclusive) and ended with 7091 (because the first line is the header of the file, you do not have 7092). So, both programs removed 300001-7091=292910 candidates, so, they both "pulled out" 292910 factors, but newpgen only listed those higher than 2^32, while srXseive listed those higher than 1M. Look to the files. This is because small factors (under 2^32, respective under 1M) are not interesting, you can anytime list them all with few minutes run of any siever, and also, sieving will be very slow if you list all terms divisible by 3, all divisible by 5, by 7, and so on, you will lose 90% of the time printing on screen and listing in files. Therefore, for both programs, you can "choose" a bound under which the factors are not recorded in files, neither printed on screen.

Last fiddled with by LaurV on 2020-03-17 at 07:29

2020-03-17, 13:00   #13
axn

Jun 2003

41×113 Posts

Quote:
 Originally Posted by storm5510 NewPGen does not start storing factors until it p passes 2^32.
Are you sure about that? IIRC, NewPGen starts outputting individual factors past 1e9.

2020-03-18, 08:35   #14
LaurV
Romulan Interpreter

Jun 2011
Thailand

206078 Posts

Quote:
 Originally Posted by axn Are you sure about that? IIRC, NewPGen starts outputting individual factors past 1e9.
See my post. In his zip, in fact, is already 1e6 (not 1e9). The "2^32" in the message from newpgen in menu, is false (remnant from a very old version).

For srXsieve you can use -m or so (see help of srXsieve).
Try:
Code:
srsieve -p 2 -P 5e10 -n 350000 -N 650000 -f -m 3 "7*2^^n-1"
to get all ~293000 eliminated terms in a file, from the first prime

This is a false alarm.
Case closed.

Last fiddled with by LaurV on 2020-03-18 at 08:52

2020-03-18, 09:27   #15
axn

Jun 2003

41×113 Posts

Quote:
 Originally Posted by LaurV See my post. This is a false alarm. Case closed.

2020-03-18, 23:12   #16
storm5510
Random Account

Aug 2009
U.S.A.

4E016 Posts

It's not up to me to understand why it does this. It is only necessary to know how to use them.

Quote:
 Originally Posted by rogue Why are you using newpgen for this form? Use srsieve/sr1sieve. They are much, much faster than newpgen for this form.
I used it for this comparison only. I use srsieve/sr1sieve normally.

Quote:
 Originally Posted by LuarV The "2^32" in the message from newpgen in menu, is false
False! Look at the attached image...
Attached Thumbnails

 2020-03-19, 05:29 #17 Happy5214     "Alexander" Nov 2008 The Alamo City 3·113 Posts I think LaurV meant the message is inaccurate, i.e. the actual code is different than the description, not that it wasn't there at all.
2020-03-20, 00:48   #18
storm5510
Random Account

Aug 2009
U.S.A.

25·3·13 Posts

Quote:
 Originally Posted by Happy5214 I think LaurV meant the message is inaccurate, i.e. the actual code is different than the description, not that it wasn't there at all.
Yes the message is way off and also explains the huge difference I originally posted about. A sample:

Quote:
 p=1002553 divides n=785554 p=1004209 divides n=775211 p=1004449 divides n=759026 p=1009609 divides n=787949 p=1009873 divides n=761471
it starts at 1,000,000. Not 4,294,967,296‬.

 2020-03-20, 06:57 #19 LaurV Romulan Interpreter     Jun 2011 Thailand 100001100001112 Posts That's what I said. The message is false. Your file in the zip started at 1M, in spite of the fact that the message says 2^32. This is remnant from the very early development stage, then the author concentrated on the algorithm, not the message.This is a known (minor) "issue" of newpgen. But again, you can customize where the "recording" of the factors start, albeit it is not so transparent like using the "-m XXX" switch in srsieve. Try my srsieve command above**, and see the result, to compare. You will get all ~292000 factors eliminated candidates (most by division by 3, 5, and 11) in a file, if you need them. The "issue" is not addressed, because, like other people here said, nobody uses newpgen anymore. There are tools 5 to 10 times faster or more. ------------ ** Note that the double power symbol in "7*2^^n-1" is there because if you type it at command prompt, this is a "control character" in Dos/Windows/shell, and the command interpreter will remove it, same like the backslash character in C. You may nod need it if you put the sequence in a file and call with file name, or if you put the command in a batch, etc. Last fiddled with by LaurV on 2020-03-20 at 07:04
2020-03-21, 15:26   #20
storm5510
Random Account

Aug 2009
U.S.A.

25·3·13 Posts

Quote:
 Originally Posted by LaurV ...The "issue" is not addressed, because, like other people here said, nobody uses newpgen anymore. There are tools 5 to 10 times faster or more...
I do not use it either. It is too slow. I much prefer srsive/sr1sieve.

2020-03-22, 22:22   #21
c10ck3r

Aug 2010
Kansas

547 Posts

Quote:
 Originally Posted by storm5510 ... During the sieve NewPGen pulled out 5,603 factors, sr1sieve pulled out 840. Yet, the compete files for LLR were exactly the same. 7,092 elements each. Some may be familiar with fc, short for file compare. I compared both LLR files. The only difference was in the header line at the very top. ... Q: How is it possible for NewPGen to flag so many more factors than sr1sieve and both results files be virtually identical?
The srsieve suite removes numbers with algebraic factors prior to sieving. Therefore, fewer numbers are *actually* sieved, and so fewer numbers need factors found to get to the same output file status.

 Similar Threads Thread Thread Starter Forum Replies Last Post Cybertronic Factoring 0 2014-03-22 10:07 MooooMoo Riesel Prime Search 16 2008-12-11 11:46 roger Information & Answers 0 2007-04-04 22:38 Cruelty Riesel Prime Search 3 2006-02-15 05:15 Zenmastur Software 4 2003-08-02 19:43

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

Sun Jul 12 00:53:53 UTC 2020 up 108 days, 22:26, 0 users, load averages: 1.18, 1.15, 1.29