Ray,
The quad_xxx routines are pretty low-level; I wonder if they should be
advertised to users at all.
Though sophisticated users will surely want to control the details of which
integration algorithm they use, general users shouldn't have to worry about
that. And even for the sophisticated user, the high-level interface could
be something like:
numeric_integrate( foo(x),x,a,b, method = quad_qagi)
There remains the question of where to put all the additional information
the quad_xxx routines return. Ideally, instead of having the numeric
approximation and the error be returned separately, they'd be returned as
some sort of interval; but of course we don't currently support intervals.
Do most users care about the number of integrand evaluations? If not, this
could be returned as a global (yuck, but...) or as an out variable e.g.
numeric_integrate(..., evaluation_count = 'evalcountvar). As for the error
code, the routine should just raise an exception.
-s