poisson_distribution gives false results for high means
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
participants (1)
-
Thibauld Nion