octave-maintainers
[Top][All Lists]
Advanced

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

Re: cquad name change


From: Rik
Subject: Re: cquad name change
Date: Thu, 31 Mar 2011 07:16:21 -0700

On 03/30/2011 07:57 PM, address@hidden wrote:
> Subject:
> Re: cquad function for Octave
> From:
> Pedro Gonnet <address@hidden>
> Date:
> Wed, 30 Mar 2011 21:54:08 +0100
> Hi John et al.,
> 
> Moving this discussion here as requested. I'm a bit surprised by the
> name change. It's a bit of a problem since in the ACM TOMS paper on the
> algorithm, I wrote:
> 
>         Algorithm 3 was reimplemented in the C programming language as
>         cquad for both the GNU Scientific Library [Galassi et al. 2009]
>         and in Octave [Eaton 2002] (using the native Oct-File interface)
>         and is available from within both projects.
> 
> So, if possible, I would prefer it being re-re-named to cquad... Or were
> there reasons for this of which I am unaware?
All of the routines which do numerical (QUAD)rature in Octave and Matlab
begin with the prefix 'quad'.  Currently users can type quad<Tab> to see a
list of possible integration functions.  This was more important before
extensive @seealso links were put in the documentation, but I still suspect
a routine called 'cquad' would remain undiscovered by most users.  On
reading the documentation for the function I noticed that it uses
"Clenshaw-Curtis quadrature rules", hence the "cc" suffix.  This is in line
with existing functions like quadgk which implement "Gauss-Konrod quadrature".

If you would like, we can put in a temporary redirect from 'cquad' to
'quadcc' which would throw up a warning message that the function has been
renamed.  This redirect would last for two major releases of Octave (until 3.8)
> 
> I had also submitted, a while back, a set of patches for the
> documentation, adding the exact reference to the paper:
> 
>         @cite{P. Gonnet, "Increasing the Reliability of Adaptive
>         Quadrature Using Explicit Interpolants", ACM Transactions on
>         Mathematical Software, Vol. 37, Issue 3, Article Nr. 3, 2010}
>         
> but this doesn't seem to have made it in. Could this be added too?
Not a problem.  I added it today in changeset 7c915d013b9c.
> 
> Many thanks and sorry for being a bother about this,
I've been meaning to write you about guidance on when to use quadcc.
General recommendations from the Mathworks for the various quadrature
routines are:

The quad function may be most efficient for low accuracies with nonsmooth
integrands.

The quadl function may be more efficient than quad at higher accuracies
with smooth integrands.

The quadgk function may be most efficient for high accuracies and
oscillatory integrands. It supports infinite intervals and can handle
moderate singularities at the endpoints. It also supports contour
integration along piecewise linear paths.

I would like to add a similar table to the Octave documentation that helps
user's pick the most appropriate routine.  Is quadcc best for high
accuracies on non-smooth integrands?

Cheers,
Rik


reply via email to

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