-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwin_smooths.h
40 lines (35 loc) · 1.61 KB
/
twin_smooths.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef TWIN_SMOOTHS_H
#define TWIN_SMOOTHS_H
#include "compact_representations.h"
GEN twin_smooth_d(GEN S, GEN d, ulong m, GEN P);
/* Twin smooths (for value d)
* Input: Vector S of primes below a bound B;
positive, even, squarefree integer d;
upper bound m.
* Output: Vector containing all x, such that x(x+1) is B-smooth, corresponding to d.
*/
GEN twin_smooth(ulong B);
/* Twin smooths.
* Input: Positive integer B;
* Output: Vector containing all x, such that x(x+1) is B-smooth.
*/
GEN regulator_range(GEN O, ulong A, ulong B);
/* Regulator in range.
* Input: Real quadratic order O (as output by rqoinit);
positive integers A < B.
* Output: If the regulator R (or an integer multiple) is in [A, B]:
[[f, p], [b, d, k]], where (b, d, k) is an (f, p) representation of (1) in O with b = (1) and k \approx R/log2.
Otherwise:
NULL.
*/
GEN twin_smooth_range_d_small(ulong B, GEN d, ulong bot, ulong top, ulong m);
/* Twin smooths (for value d) in range, small.
* Input: Smoothness bound B;
positive, even, squarefree integer d;
range [bot, top];
upper bound m.
* Output: Vector containing all x, such that x(x+1) is B-smooth corresponding to d.
Here we only perform a check if the regulator (or a multiple of it) corresponding to d is in [bot, top] and otherwise skip the discriminant, this ensures that x does not have much more than top bits.
The value m decides how many solutions (including the fundamental) are checked, the algorithm is supposed to be run with m < 5.
*/
#endif