
Boost : 
From: John Maddock (john_at_[hidden])
Date: 20080506 08:16:10
Paul A Bristow wrote:
> A brief study of this (kindly provided by Oliver Seiler) shows it to
> be 'interesting'  but outstandingly accurate.
>
>> MathCAD appears to offer the density, cumulative and inverse,
>> so this could provide some independent test values.
>
> K Krishnamoorthy, Handbook of Statistical distributions with
> applications, in Chapter 4 deals with this distribution and also
> gives FORTRAN algorithms, but Wu (see above ref) shows that these
> approximations can be spectacularly inaccurate at times.
>
> So this (and other distributions) might be a good GSoC?
I don't think it's big enough for a SOC on it's own  shouldn't be more than
a couple of days work  a week at worst?
The tricky bit as Wu notes is calculating the h(0) term  after that it's a
reasonably straightforward series evaluation. But... I'm not completely
convinced by the practicality of Wu's method  it's really very cunning, no
doubt about that  but requires a table of all the prime numbers smaller
than the sample size, the first 1000 primes would take you up to 8K, but
then you need another table of the same size to keep track of all the common
factors (unless I'm missing a trick somewhere).
We could get the first term from two calls to tgamma_delta_ratio, but I
haven't completely convinced myself that it won't unnecessarily
under/overflow. Otherwise you're into using logs and lgamma, which is
rather prone to cancellation errors in calculating the result :(
John.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk