commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex D Herbert (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (RNG-93) SmallMeanPoissonSampler should require p0 to be positive
Date Mon, 15 Apr 2019 15:37:00 GMT

     [ https://issues.apache.org/jira/browse/RNG-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alex D Herbert updated RNG-93:
------------------------------
    Summary: SmallMeanPoissonSampler should require p0 to be positive  (was: SmallMeanPoissonSampler
)

> SmallMeanPoissonSampler should require p0 to be positive
> --------------------------------------------------------
>
>                 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
>            Priority: Trivial
>
> 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)

Mime
View raw message