Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/libs/lcalc/lcalc_sage.h
4108 views
1
#include "L.h"
2
3
int *new_ints(int l)
4
{
5
return new int[l];
6
}
7
8
9
void del_ints(int *A)
10
{
11
delete[] A;
12
}
13
14
15
double *new_doubles(int l)
16
{
17
return new double[l];
18
}
19
20
21
void del_doubles(double *A)
22
{
23
delete[] A;
24
}
25
26
27
Complex *new_Complexes(int l)
28
{
29
return new Complex[l];
30
}
31
32
33
void del_Complexes(Complex *A)
34
{
35
delete[] A;
36
}
37
38
Complex new_Complex(double r, double i)
39
{
40
return Complex(r,i);
41
}
42
43
44
void testL(L_function<Complex> *L)
45
{
46
int i;
47
cout << "number of coefficients " << L->number_of_dirichlet_coefficients << endl;
48
cout << "dirichlet coeffs"<< endl;
49
for (i=0;i< min(30, L->number_of_dirichlet_coefficients +1); i++)
50
cout << L->dirichlet_coefficient[i]<<endl;
51
cout << "Q " << L->Q << endl;
52
cout << "Omega " << L->OMEGA << endl;
53
cout << "a " << L->a << endl;
54
cout << "Period " << L->period << endl;
55
cout << "Number of Poles " << L->number_of_poles << endl;
56
cout << "What type " << L->what_type_L << endl;
57
for (i=0;i< L->number_of_poles+1;i++)
58
{
59
cout<< "pole[" << i << "] = " << L->pole[i] << endl;
60
cout<< "residue[" << i << "] = " << L->residue[i] << endl;
61
}
62
cout << "Value at .5 " << L->value(.5) <<endl;
63
cout << "Value at 1" << L->value(1.0) <<endl;
64
cout << "Value at .5+I" << L->value(.5+I) <<endl;
65
}
66
67
68