-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpmanin.cc
66 lines (65 loc) · 1.83 KB
/
pmanin.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
59
60
61
62
63
64
65
66
#include <fstream>
#include "newforms.h" // which includes quads.h & moddata.h & etc.
#define LOOPER
#ifdef LOOPER
#include "looper.h"
#endif
int main ()
{
int d,maxpnorm=1000000;
cout << "Enter field: " << flush; cin >> d;
if(!((d==1)||(d==2)||(d==3)||(d==7)||(d==11)))
{
cout<<"field must be one of: 1, 2, 3, 7, 11!\n";
exit(1);
}
Quad::field(d,maxpnorm);
Quad::displayfield(cout);
Quad n; int verbose=0;
int startp, stopp;
cout << "Verbose? "; cin>>verbose;
cout << "Which primes for Hecke eigenvalues (first#, last#)? ";
cin >> startp >> stopp; cout << endl;
if (stopp>nquadprimes)
{
cout<<"Reducing last# to "<<nquadprimes<<endl;
stopp=nquadprimes;
}
int output=1;
cout << "Output Hecke eigenvalues? (0/1) "; cin >> output;
#ifdef LOOPER
long firstn, lastn;
int both_conj;
cout<<"Both conjugates? (0/1) "; cin >> both_conj;
cout<<"Enter first and last norm for Quads: ";
cin >> firstn >> lastn;
if(firstn<2) firstn=2;
for(Quadlooper alpha(firstn,lastn,both_conj); alpha.ok(); ++alpha)
#else
Quad alpha;
while(cout<<"Enter level: ", cin>>alpha, alpha!=0)
#endif
{
//cout<<endl;
n = makepos((Quad)alpha); // makepos normalizes w.r.t. units
vector<Quad> plist=pdivs(n); if(plist.size()>1) continue;
long normn = n.norm();
string efilename = eigfile(n);
cout << ">>>> Level " << ideal_label(n) <<" = ("<<n<<"), norm = "<<normn<<" <<<<" << endl;
newforms nf(n,verbose);
nf.find();
//nf.display();
nf.getap(startp,stopp,verbose);
//cout << "After sort_lmfdb():\n";
nf.sort_lmfdb();
nf.display();
if(output)
{
cout << "Writing data to file "<<efilename<<"..."<<flush;
nf.output_to_file(efilename);
cout << "done." << endl;
}
cout<<"==========================================="<<endl;
}
// cout<<endl;
}