Output out=new Output(20);
x1=0.0;x2=1.0;
rhs_StepperStoerm d = new rhs_StepperStoerm();
StepperStoerm s1= new StepperStoerm();
Odeint ode1 = new Odeint(y,x1,x2,atol,rtol,h1,hmin,out,d,s1);
ode1.integrate();
yexp[0]=bess.airy_ai(1.0);
yexp[1]=bess.airy_bi(1.0);
for (i=0;i<nvar;i++) {
yout[i]=out.ysave[i][out.count-1];
System.out.printf("%f %f\n", yout[i],yexp[i]);
}
sbeps = 1.e-8;
System.out.println(maxel(vecsub(yout,yexp)));
localflag = maxel(vecsub(yout,yexp)) > sbeps;
globalflag = globalflag || localflag;
if (localflag) {
fail("*** StepperStoerm: Inaccurate integration #1");
}
y[0]=1.0/pow(3.0,2.0/3.0)/exp(gammln(2.0/3.0)); // Ai(x)
y[nvar]=-1.0/pow(3.0,1.0/3.0)/exp(gammln(1.0/3.0));
dydx[0]=0.0;
y[1]=1.0/pow(3.0,1.0/6.0)/exp(gammln(2.0/3.0)); // Bi(x)
y[nvar+1]=pow(3.0,1.0/6.0)/exp(gammln(1.0/3.0));
dydx[1]=0.0;
x1=0.0;x2=-1.0;
StepperStoerm s2 = new StepperStoerm();
Odeint ode2 = new Odeint(y,x1,x2,atol,rtol,h1,hmin,out,d,s2);
ode2.integrate();
yexp[0]=bess.airy_ai(-1.0);
yexp[1]=bess.airy_bi(-1.0);
for (i=0;i<nvar;i++) {
yout[i]=out.ysave[i][out.count-1];