|
Boost : |
From: Topher Cooper (topher_at_[hidden])
Date: 2007-01-31 17:47:59
At 03:57 PM 1/31/2007, you wrote:
>Yes, this is the reason - maybe one could just make the more accurate
>version the default?
The default should be the one that won't get you into trouble -- i.e.
the accurate version. Especially when the cost is one extra addition
two extra multiplies and a divide per iteration -- rarely a
significant cost compared to the process generating the samples
(e.g., an input operation or a non-uniform RNG). User's who know
enough and care enough to choose the dirty version intelligently
could do so. Eventually you could specialize to default to the naive
method if the accumulators are using exact arithmetic and you can be
sure you won't overflow (remember, the naive method requires roughly
twice the number of bits to store the final cumulants).
Topher
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk