Wolfgang Jenkner wrote:
> Raymond Toy <rtoy@earthlink.net> writes:
>
>
>>I'm open to suggestions on what arguments these functions should take
>>and what they should return.
>>
>>Also, since these are in Lisp, it opens up the possibility of doing
>>multiple integrals adaptively
>
>
> Below you find a quick prototype hack which implements a QUANC8 (from
> share/numeric/qq.lisp) or ROMBERG like interface for the new QAGS
> function. Here's an iterated integral from qq.dem (the other examples
> in that demo also work)
>
> (C2) qags(qags(exp(x)*sin(y),x,0,2),y,0,1);
> (D2) 2.937034356357518
> (C3) qags_info;
> (D3) [2.937034356357518, 3.26076316654324E-14, 21, 0]
>
Very nice! Although I wonder about that estimated error.
Still looking for the appropriate interface. I don't like globals that
much, but perhaps that's appropriate for epsrel, limit, and other
parameters. I prefer functional interfaces.
We should also do something other than force the user to look at the
error code to figure out if the integration was ok. Conditions would be
ideal, but it seems gcl doesn't have conditions and/or
handler-case/bind, etc.
Ray