Boost logo

Boost Users :

Subject: Re: [Boost-users] Is there a C++ implementation for numerical quadrature/cubature?
From: John Maddock (jz.maddock_at_[hidden])
Date: 2017-08-19 07:42:25

On 19/08/2017 05:10, Easior Lars via Boost-users wrote:
> Hi, all in the list!
> I need some functions to handle numerical quadrature/cubature in
> C++. I found that only few packages, e.g. GSL, could do this end.
> However, those ones are not pure C++ implementations. Although,
> odeint package in Boost can partially satisfy my need. I want to
> know whether there is a C++ implementation for numerical
> quadrature/cubature in Boost. Any suggestion?

We're working on it for Boost.Math:

* The next release will have fairly simple adaptive trapezoidal quadrature.
* I'm trying to quash the last few CI failures for double-exponential
quadrature now (tanh-sinh, exp-sinh and sinh-sinh) - that looks to be a
remarkably efficient and general purpose integrator (and yes it works
very well with arbitrary precision types). That's targeted for 1.66.
* We have the bits in place for adaptive Gauss-Konrad, but haven't
worked out the details yet.... not sure if that one will make 1.66 or a
later release.

If you wanted to try out the double-exponential code now, it's here:, I've currently broken the
tests (!), but the headers are all ready to go, and if you'd like to
give the new code a test drive and report back that would be great. As
with most quadrature routines, it's fairly easy to break if you're
cunning enough (which is why the tests are currently broken!), but it
does handle endpoint singularities very well, and is a lot more robust
and efficient than I expected. I've put a PDF build of the docs from
that branch here: you will need to
navigate to the tools->quadrature section (page 745).

HTH, John.

This email has been checked for viruses by AVG.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at