24 const double &fc,
const double &fb)
26 return (fa + fb + 4.0*fc)*(h/6.0);
30 const double& h,
const double &a,
31 const double &c,
const double &b,
32 const double &fa,
const double &fc,
33 const double &fb,
const double &sx,
34 const double &tol,
long &recursion)
37 double ca = 0.5*(a+c);
38 double cb = 0.5*(c+b);
39 double fca = func(ca);
40 double fcb = func(cb);
43 double sa =
Simpson(h2,fa,fca,fc);
44 double sb =
Simpson(h2,fc,fcb,fb);
46 double err_est = (sa+sb-sx)/15.0;
56 return SimpsonAd(func,h2,a,ca,c,fa,fca,fc,sa,tol,recursion)
57 +
SimpsonAd(func,h2,c,cb,b,fc,fcb,fb,sb,tol,recursion);
62 const double& a,
const double& b,
75 res =
SimpsonAd(func,b-a,a,c,b,fa,fc,fb,sx,tol,recursion);