-
Notifications
You must be signed in to change notification settings - Fork 1
/
nflist.cc
59 lines (55 loc) · 1.44 KB
/
nflist.cc
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include "qidloop.h"
#include "newforms.h" // which includes quads.h & moddata.h & etc.
//#define LOOPER
int main ()
{
long d, maxnorm(10000); // must be at least as many as #eigs on file
cerr << "Enter field: " << flush; cin >> d;
Quad n;
long nap;
cerr << "How many coefficients ap? "<<flush; cin>>nap;
#ifdef LOOPER
long firstn, lastn;
cerr<<"Enter first and last norm for levels: ";
cin >> firstn >> lastn;
cerr<<endl;
int both_conj=1;
if (lastn>maxnorm) maxnorm = lastn;
#endif
Quad::field(d,maxnorm);
#ifdef LOOPER
Qidealooper loop(firstn, lastn, both_conj, 1); // sorted within norm
while( loop.not_finished() )
{
Qideal N = loop.next();
#else
if (Quad::class_number==1)
{
auto pr=Quadprimes::list.begin();
long np=0;
cout << "Primes: "<<endl;
while(np<(nap<0?25:nap))
{
Quadprime p = *pr++;
np ++;
cout << p.gen() << ", ";
}
cout << "..." << endl;
}
Qideal N;
while(cerr<<"Enter level (ideal label or generator): ", cin>>N, !N.is_zero())
{
#endif
//cout<<"Level "<<ideal_label(N)<<" = "<<N<<": "<<flush;
newforms nf(N,0);
if(nf.read_from_file())
{
nf.list(nap);
// Uncomment the next two lines if you want to rewrite the newforms files
// string efilename = eigfile(N);
// nf.output_to_file(efilename);
}
else
cout << "No data file for level " << ideal_label(N) << endl;
}
}