}
int main_levex(){
int nterm=12;
double beta=1.0,a=0.0,b=0.0,sum=0.0;
Levin series = new Levin(100,0.0);
//cout << setw(5) << "N" << setw(19) << "Sum (direct)" << setw(21)
// << "Sum (Levin)" << endl;
for (int n=0; n<=nterm; n++) {
b+=PI;
double s=qromb(this,a,b,1.e-8);
a=b;
sum+=s;
double omega=(beta+n)*s;
double ans=series.next(sum,omega,beta);
//cout << setw(5) << n << fixed << setprecision(14) << setw(21)
// << sum << setw(21) << ans << endl;
System.out.printf("%f %f\n", sum, ans);
}
return 0;