mpqsMultiplier.cc File Reference

contains a method for finding a suitable multiplier to speedup the MPQS More...

#include "utils.H"
#include "mpz_wrapper.H"
#include "modulo.H"
#include <cmath>

Include dependency graph for mpqsMultiplier.cc:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define BEWERTUNG_MIT_POTENZEN

Functions

void determine_best_MPQS_Multiplier (const mpz_t n, mpz_t kN, int &new_MPQS_Multiplier)


Detailed Description

contains a method for finding a suitable multiplier to speedup the MPQS

See the German text "Vorfaktorbestimmung für das Quadratische Sieb" (http://www.thorstenreinecke.de/downloads/) and the referenced literature therein for more information about methods to calculate a suitable multiplier.

Definition in file mpqsMultiplier.cc.


Define Documentation

#define BEWERTUNG_MIT_POTENZEN

Definition at line 17 of file mpqsMultiplier.cc.


Function Documentation

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.

Parameters:
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
Returns:
the function returns the results in 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().

Here is the call graph for this function:


Generated on Wed Nov 7 23:30:02 2007 for Qsieve by  doxygen 1.5.4