Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2007-04-14 05:04:40


Marco wrote:
> Hi, I would like some information.
> How much the special functions implementation is targeted to the
> evaluation of statistical quantities over the different distributions
> ? Is the special functions implentation enough general to be usable
> as a standalone library ?

Yes absolutely.

> If so, why not split the math toolkit into two libraries ?

That's more or less what happended already if you read the docs, ultimately
I expect this to all become part of Boost.Math but with separate links from
our library's index to each of the subsections. Other suggestions welcomed
of course :-)

One thing I'm not keen to do is totally split the docs: there's a huge
amount of cross referencing between the parts, and it would be a major
undertaking to fully separate them. I'd prefer to keep them as separate
"chapters" to one Boost.Math lib, with of course hopefully more chapters in
due course (if someone volunteers to write them!)

> A special funcion library, merged with the special functions by Hubert
> Holin and Eric Ford, and a statistics library including distributions
> and operation over them. If their code is already uncoupled, this
> would require only a documentation splitting.

The review code already contains updated versions of Hubert's code, plus his
docs merged into mine.

> How much the special functions in the math toolkit conform to the ISO
> C++09 standard proposal for a special function library ?

Quite a lot, there are currently only four special functions missing that
are present in the TR1: the two hypergeometric functions, zeta, and the
exponential integral. The latter two are known quantities, but the
hypergeometrics are vertually impossible to do right IMO (and certainly
impossible to fully test - there are two many degrees of freedom to
guarantee adequate coverage). Those four might make an interesting SOC
project for someone next year though. In the mean time if the library is
accepted then the plan is for me to provide a TR1-compatible thin wrapper to
the special functions, within the Boost.TR1 library. Also missing are some
of the C99 math functions: many of these though can only be implemented at
the hardware level (all those rounding control functions for example), so
those won't be appearing in the foreseeable future. But most platforms seem
to be acquiring these anyway?

There are also a few special functions that are essential for the stats code
but not present in TR1: the incomplete gamma and beta functions plus there
inverses, and digamma. And then there are a few ad-hoc functions that are
used internally, but exposed publicly because the problems they solve often
crop up when implementing other special functions: things like tgamma1pm1(z)
which calculates tgamma(1+z)-1 for small z.

Hope this helps, the special functions index is online here
http://freespace.virgin.net/boost.regex/toolkit/html/math_toolkit/special.html
BTW.

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk