On Mar. 27, 2012, Richard Fateman wrote:
-----------------
>Another approach is to say that the quadrature program provides
>only "absolute error" bounds if the answer is near zero, instead of
>"relative error" (or X digits of accuracy) elsewhere.
----------------------------------
This suggests that a quadpack wrapper redo a calculation
which returns an answer "near" zero (together with
error code = 2) by replacing the rel error criterion with
an abs error criterion. Using an example suggested
by Ray Toy:
----------------------
(%i1) (display2d:false,fpprintprec:8)$
(%i2) integrate(sin(x+1),x,-3,1);
(%o2) 0
(%i3) quad_qags(sin(x+1),x,-3,1);
***MESSAGE FROM ROUTINE DQAGS IN LIBRARY SLATEC.
***INFORMATIVE MESSAGE, PROG CONTINUES, TRACEBACK REQUESTED
* ABNORMAL RETURN
* ERROR NUMBER = 2
*
***END OF MESSAGE
(%o3) [1.51674678E-17,3.12789662E-14,21,2]
(%i4) quad_qags(sin(x+1),x,-3,1,'epsabs = 1d-8);
(%o4) [1.51674678E-17,3.12789662E-14,21,0]
(%io5) quad_qags(sin(x+1),x,-3,1,'epsabs = 1d-8,'epsrel = 0.0,limit=800);
(%o5) [1.51674678E-17,3.12789662E-14,21,0]
---------------------------------------------
Ted