From: John Maddock (john_at_[hidden])
Date: 2006-04-02 12:25:55
> This looks a considerable improvement over the use of the Cephes
> library, essentially a C library over which I am (was?) putting a C++
> wrapper, especially in improved accuracy, efficiency, testing and
> general 'niceness' - no longer a kludge.
> I am/will be watching with great interest.
> Tell how I can help.
1) Tell me everything that's wrong with it :-)
2) I'll never compete with Cephes on breadth of functions provided, so if
you want to chip in with any implementations feel free :-) The distribution
and density functions along with test data would be a good place to start.
3) Suggestions for error handling would be very welcome. Currently they're
just assertions that the input is in the required domain, potentially we
could throw a domain_error and/or call a user defined handler. Although
what the latter would look like for template code I'm not sure. There's
also the question of what to do about infinite results, and/or evaluation at
poles that have residual values (is this a domain error? It is at present),
and/or what to do about results that underflow to zero (do folks need to
know that the result is not *really* zero?).
> PS I have some concern about the names of functions, especially in
> the light of my C++ Standards proposal which is still 'on the table'
> (and some dreadful choices for C(( functions). But this is a minor
> detail - until it starts to be used in anger.
I have lots of reservations as well. Originally I started following
Mathematica's names, but they didn't always fit either :-(
Probably the only ones I'm reasonably set on are the gamma_Q/gamma_P names
which reasonably obviously link to the standard mathematical notation used
for those functions. I don't like calling one of these a "complement"
because it's not obvious to me at least, which is the complement! For the
non-normalised versions the upper incomplete gamma is normally the main
function GAMMA(a,x), and the lower incomplete gamma is the "sort of"
complement with the lower case Greek letter. But that's the opposite of the
sense sometimes used for the regularised versions. The P and Q notation is
universal and unambiguous.
I agree with you that "tgamma" is a very unfortunate choice that we're
probably stuck with for historical reasons. On the other hand, we could
just do our own thing :-)
The incomplete beta function names I have no strong opinions over.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk