Boost logo

Boost Users :

From: Thibauld Nion (thibauld.nion_at_[hidden])
Date: 2007-05-20 07:50:25


Hi,

I'm using the boost/random library in a research project and really
appreciate it, but I recently came across an annoying problem with
the poisson_distribution.

When instanciated with a relatively high expected mean (it happened
for mean>10,000) the results given by this distribution is
arbitrarily false. Actually the algorithm uses a comparison with exp(-
mean) which I guess explains it all. Depending on the computer's
precision this can be 'equal' to zero for relatively low values of
'mean'. Hence the random variables generated with the help of this
distribution clearly do not follow a poisson distribution when the
mean is too high.

Of course a clever and careful user (unlike me) would not have fallen
on this, but I thought it was worse mentionning -- especially since a
well known workaround consists in using a normal distribution when
'mean' is 'high' (>100 usually does it...). Also, maybe a short
notice of this problem could be made in the distribution's
documentation ?

Regards,

Thibauld


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net