You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alex Herbert (Jira)" <ji...@apache.org> on 2026/08/21 14:52:00 UTC
[jira] [Created] (RNG-194) Samplers to validate arguments are finite to avoid invalid samples or infinite loops
Alex Herbert created RNG-194:
--------------------------------
Summary: Samplers to validate arguments are finite to avoid invalid samples or infinite loops
Key: RNG-194
URL: https://issues.apache.org/jira/browse/RNG-194
Project: Commons RNG
Issue Type: Bug
Components: sampling
Affects Versions: 1.7
Reporter: Alex Herbert
Many samplers can be constructed with infinite or NaN parameters. This results in invalid samples (Infinite/NaN), constant samples, or infinite loops from the sampling algorithm.
The following samplers require validation:
||Sampler||Parameters||
|BoxMullerGaussianSampler|mean; standard deviation|
|ChengBetaSampler|alpha; beta|
|AhrensDieterMarsagliaTsangGammaSampler|alpha; theta|
|LogNormalSampler|mu; sigma|
|LevySampler|location; scale|
|AhrensDieterExponentialSampler|mean|
|ZigguratSampler.Exponential|mean|
|InverseTransformParetoSampler|scale; shape (note that shape can be infinite)|
|ContinuousUniformSampler|low; high|
|RejectionInversionZipfSampler|exponent|
In the case of the ContinuousUniformSampler, use of an infinite bound and the open-interval sampler will result in an infinite loop.
In the case of the RejectionInversionZipfSampler, use of an infinite exponent will result in an infinite loop.
Issue identified using a security scan.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)