mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > FermatSearch

Reply
 
Thread Tools
Old 2019-01-28, 09:10   #1
houding
 
houding's Avatar
 
"Adolf"
Nov 2013
South Africa

61 Posts
Default 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?
houding is offline   Reply With Quote
Old 2019-01-28, 12:37   #2
ET_
Banned
 
ET_'s Avatar
 
"Luigi"
Aug 2002
Team Italia

2·2,383 Posts
Default

Quote:
Originally Posted by houding View Post
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?
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);
   }
ET_ is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
gfndsieve rogue FermatSearch 12 2020-05-19 12:25

All times are UTC. The time now is 11:01.

Fri Sep 25 11:01:07 UTC 2020 up 15 days, 8:12, 0 users, load averages: 1.17, 1.42, 1.50

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.