#include "qsieve-fwd.H"
#include "mpz_wrapper.H"
#include "modulo.H"
Go to the source code of this file.
Classes | |
class | StaticFactorbase |
Functions | |
int | SQRT_kN_mod_PrimeNumber (const unsigned int Primzahl) |
int | check_SQRT_kN_mod_PrimeNumber (const int Primzahl) |
void | determine_best_MPQS_Multiplier (const mpz_t n, mpz_t kN, int &new_MPQS_Multiplier) |
Variables | |
mpz_t | kN |
int | MPQS_Multiplier |
int | LogicalSieveSize |
Definition in file StaticFactorbase.H.
int check_SQRT_kN_mod_PrimeNumber | ( | const int | Primzahl | ) |
Definition at line 59 of file StaticFactorbase.cc.
References cerr, endl(), exit(), kN, MARK, mpz_clear(), mpz_init_set_ui(), mpz_mod_ui(), mpz_mul(), mpz_sub(), and SQRT_kN_mod_PrimeNumber().
void determine_best_MPQS_Multiplier | ( | const mpz_t | n, | |
mpz_t | kN, | |||
int & | new_MPQS_Multiplier | |||
) |
It is convenient to have many small primes inside the static factorbase. One can multiply the number (which is to factorize) by a small multiplier (which should be squarefree) to get a different (better) factorbase.
n | number to factorize (using MPQS) | |
kN | resulting number for MPQS (including the new MPQS_Multiplier) | |
new_MPQS_Multiplier | the new MPQS_Multiplier for n |
kN
and new_MPQS_Multiplier
. Definition at line 31 of file mpqsMultiplier.cc.
References ceil(), cin, cout, endl(), exp(), SieveControl::FBLowestStartIndex, numtheory::is_prime(), log(), mpz_clear(), mpz_init(), mpz_legendre(), mpz_mul_ui(), my_mpz_wrapper::mpz_remainder_ui(), mpz_set_ui(), mpz_sizeinbase(), std::setprecision(), and polynomial::square().
Referenced by main().
int SQRT_kN_mod_PrimeNumber | ( | const unsigned int | Primzahl | ) | [inline] |
Definition at line 40 of file StaticFactorbase.H.
References kN, my_mpz_wrapper::mpz_remainder_ui(), and numtheory::sqrtmod().
Referenced by check_SQRT_kN_mod_PrimeNumber(), and StaticFactorbase::compute_StaticFactorbase().
mpz_t kN |
Definition at line 75 of file file-client.cc.
Referenced by check_SQRT_kN_mod_PrimeNumber(), cleanup_memory(), StaticFactorbase::compute_StaticFactorbase(), main(), Cprocess_clients::process_data_stream(), SQRT_kN_mod_PrimeNumber(), and CClientRelation_Delivery::THREAD_transmit_Relations().
int LogicalSieveSize |
Constraint for AMD-3DNow! specific code: abs(LogicalSieveSize)<=2^23 (because of float precision)
In contrast to "PhysicalSieveSize", LogicalSieveSize is a value that is less dependent on the hardware. You should choose the (logical) SieveSize according to size of the number to factorize. The default value should be modified before a factorization is started.
The relative rate of hits in the multiple polynomial quadratic sieve algorithm (MPQS) is higher for smaller intervals, but however, the cost of changing polynomials, initialization, and calculation of roots is higher, when polynomials are switched more often.
Definition at line 46 of file StaticFactorbase.cc.
int MPQS_Multiplier |