Alex D Herbert created RNG-93:
---------------------------------

             Summary: SmallMeanPoissonSampler 
                 Key: RNG-93
                 URL: https://issues.apache.org/jira/browse/RNG-93
             Project: Commons RNG
          Issue Type: Bug
          Components: sampling
    Affects Versions: 1.3
            Reporter: Alex D Herbert
            Assignee: Alex D Herbert


The SmallMeanPoissonSampler accepts a mean up to 0.5 * Integer.MAX_VALUE. 
However at a value above approximately mean=744.44 the probability p0 is zero:

{code:java}
p0 = Math.exp(-mean);
{code}

This causes an impossible to reach condition within the sample loop and the 
sampler will always return a sample of the upper limit. This is:

{code:java}
limit = (int) Math.ceil(Math.min(1000 * mean, Integer.MAX_VALUE));
{code}

If the sampler is updated to reject any mean where p0 = 0 then this will serve 
as a warning to users that the sampler is invalid and they should switch to the 
LargeMeanPoissonSampler.




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to