1
/*============================================================================
3
This file is part of FLINT.
5
FLINT is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
10
FLINT is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with FLINT; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
===============================================================================*/
20
/******************************************************************************
23
Header file for factor_base.c.
27
******************************************************************************/
29
#ifndef MP_FACTORBASE_H
30
#define MP_FACTORBASE_H
39
unsigned long num_FB_primes(unsigned long bits);
41
void sqrts_init(QS_t * qs_inf);
43
void sqrts_clear(void);
45
void compute_sizes(QS_t * qs_inf);
47
void sizes_clear(void);
49
//Knuth-Schroeppel multipliers and a macro to count them
51
static const unsigned long multipliers[] = {1, 2, 3, 5, 6, 7, 10, 11, 13, 14,
52
15, 17, 19, 21, 22, 23, 26, 29,
53
30, 31, 33, 34, 35, 37, 38, 41,
56
#define NUMMULTS (sizeof(multipliers)/sizeof(unsigned long))
57
#define max_mult_size 6 // number of bits of maximum multiplier
59
void primes_clear(void);
61
void primes_init(QS_t * qs_inf);
63
unsigned long knuth_schroeppel(QS_t * qs_inf);
65
unsigned long compute_factor_base(QS_t * qs_inf);