octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing AbsTol for quadcc


From: Nicholas Jankowski
Subject: Re: Implementing AbsTol for quadcc
Date: Fri, 22 Sep 2017 14:50:45 -0400

On Fri, Sep 22, 2017 at 1:31 PM, Rik <address@hidden> wrote:
9/22/17

I've been working with Nicholas on bug #52074
(https://savannah.gnu.org/bugs/?52074) to implement Matlab-compatible
functions integral2, integral3 which in Octave are wrapper functions which
call down to one of the quadrature routines quad, quadl, quadv, quadgk, or
quadcc.


To elaborate: 

Matlab has apparently deprecated most of it's quad style integrators. they released integral (and 2 and 3) in 2012, and looking through the pages for the quad-style functions, most say "will be removed in a future release. Use integral instead.".Applies to:

quad, quadl, quadv, dblquad, and triplequad (but not quadgk or quad2d)

Note the two not deprecated and integral and 2 and 3 all make use of the same general calling form, like we use now for quadgk:

quadgk(f, lim1, lim2, param1, val1, param2, val2, ...)

In addition to some other parameters, all are expected to accept both abstol and reltol, which are used in the same way specified for quadgk. Trying to have the wrappers handle abstol & reltol compatibly, with appropriate defaults, and having the underlying integrators actually respect those inputs has made the wrappers a bit convoluted.

The need to call both abstol and reltol limits integral to mostly using quadgk (with quadv for array valued functions). dblquad and triplequad only pass a single tol (incorrectly described in doc as abstol since it defaults to quadcc) to the quad specified, and they don't support passing any additional params to quad.

having quadcc accept a single vector parameter would make integral2 and 3 a bit faster and easier, and almost fully compatible. I am concerned about the backwards compatibility.

Full compatibility on integral will likely require someone to recode an arrayvalued version of quadgk or quadcc. For integral2 and 3, we need a quad2d equivalent.  But this would be a step in the right direction.

Nick J.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]