This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git


The following commit(s) were added to refs/heads/master by this push:
     new a11c6d7  Sonar fix: Change code comment to avoid commented out code 
issue
a11c6d7 is described below

commit a11c6d7725cde4877aae192002566d873f53c410
Author: Alex Herbert <aherb...@apache.org>
AuthorDate: Sun Jul 25 13:44:02 2021 +0100

    Sonar fix: Change code comment to avoid commented out code issue
---
 .../org/apache/commons/rng/sampling/distribution/StableSampler.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/StableSampler.java
 
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/StableSampler.java
index c217eef..bbf6600 100644
--- 
a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/StableSampler.java
+++ 
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/StableSampler.java
@@ -640,8 +640,8 @@ public abstract class StableSampler implements 
SharedStateContinuousSampler {
             // deviates u and w when the CMS formula fails.
 
             // Note the following term is subject to floating point error:
-            // final double xi = Math.atan(-zeta) / alpha;
-            // final double alphaPhiXi = alpha * (phi + xi);
+            // xi = atan(-zeta) / alpha
+            // alphaPhiXi = alpha * (phi + xi)
             // This is required: cos(phi - alphaPhiXi) > 0 => phi - alphaPhiXi 
in (-pi/2, pi/2).
             // Thus we compute atan(-zeta) and use it to compute two terms:
             // [1] alpha * (phi + xi) = alpha * (phi + atan(-zeta) / alpha) = 
alpha * phi + atan(-zeta)

Reply via email to