From: Paul A Bristow (pbristow_at_[hidden])
Date: 2008-05-06 12:29:41
>[mailto:boost-bounces_at_[hidden]] On Behalf Of John Maddock
>Sent: 06 May 2008 13:16
>Subject: Re: [boost] [Math
>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
>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
>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).
They sound a fairly serious requirement.
>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 :-(
Well option B is to use some quick, and sometimes dirty, approximation like everyone else does.
I'm sure this won't appeal to your philosophy, but
nothing stops us trying Wu's method later.
What accuracy does Johan (and others) *need* for his(their) application?
--- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk