mersenneforum.org (https://www.mersenneforum.org/index.php)
-   FermatSearch (https://www.mersenneforum.org/forumdisplay.php?f=133)

 houding 2019-01-28 09:10

Using gfndsieve

I've started to look into using gfndsieve, because it is multi-threaded.

I have a question. Not a problem with the program, just curious.

When I start a sieve, it will say "expecting 192048 factors".

I will run a bit.

Then stop.

It will say 190376 factors found.
9624 left.

So the expecting is less than the actual.

How is the expecting calculated? Or is it just a guess that for a given amount of numbers in a range so many could be factors after others have been eliminated because they are even numbers?

 ET_ 2019-01-28 12:37

[QUOTE=houding;507004]I've started to look into using gfndsieve, because it is multi-threaded.

I have a question. Not a problem with the program, just curious.

When I start a sieve, it will say "expecting 192048 factors".

[...]

How is the expecting calculated? Or is it just a guess that for a given amount of numbers in a range so many could be factors after others have been eliminated because they are even numbers?[/QUOTE]

If you dive into the source code, you will find a formula that calculates the approximate numbers of possible factors in a range.

At line 212 of FactorApp.cpp you will find:

[code]
if (il_MaxPrime != il_AppMaxPrime)
{
double expectedFactors = il_TermCount * (1 - log(il_MinPrime) / log (il_MaxPrime));

sprintf(endOfMessage, "expecting %.f factors", expectedFactors);
}
[/code]

 All times are UTC. The time now is 18:45.