VAL, Dmitriy40 Thanks both; apologies for copying the factors wrongly - I had several factorization attempts on the screen, and clearly confused myself when trying to paste them over.
-- 13.11.2022, 16:17 --Huz
In continuation of the previous improvement with the window title: is there a total number of patterns for the enumeration at the beginning of the work or it is obtained interactively only during the work and until the work end is unknown?
Do you mean the range of "b###" identifiers? No, this is obtained interactively during the work: the fixed primes are iterated in the normal manner, then I look at the -a or -b options to decide what to do at the point it will transition to unfixed primes.
In principle it would be possible for the code to run through them twice. But that's quite a lot of extra code just to get a count.
Цитата:
Also, I have a strange bug under windows: running with the -a switch gives out about two hundred patterns in the console and the program crashes with an unknown error (a windows dialog box appears to close the program and what the error remains unclear). Not only pcoul closes, but also console window, i.e. maybe error happens in console host (I suspect some kind of buffer overflow in windows itself). But output redirection to file works correctly.
It is the same on versions 20221107 and 20221109.
Perhaps after each pattern output (well, it's just easier, because the speed is not important here, you can do flush stdout every couple of dozens if you're not too lazy to add an extra counter)? If not already done.
That's odd, I certainly haven't seen that here - but looking at the code I see that the information is output in a stupid way. I will fix it to use the standard way, then it will also automatically get flushed, and if you select a log file it will automatically go there too.
A side-effect of the stupid way is that it tries to update the window title for every pattern, hundreds of times per second. That is probably what causes the crash for you.