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

commit 616cfaebdd8902cb5aa963866d8e4f97a129356c
Author: Alex Herbert <[email protected]>
AuthorDate: Tue Apr 14 16:15:25 2026 +0100

    Comment partial implementation
---
 .../commons/rng/sampling/distribution/InternalGamma.java   | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git 
a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InternalGamma.java
 
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InternalGamma.java
index 732a06f6..409cd725 100644
--- 
a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InternalGamma.java
+++ 
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InternalGamma.java
@@ -61,13 +61,9 @@ final class InternalGamma { // Class is package-private on 
purpose; do not make
     private InternalGamma() {}
 
     /**
-     * Computes the function \( \ln \Gamma(x) \) for \( x \gt 0 \).
+     * Computes the function \( \ln \Gamma(x) \) for \( x \geq 8 \).
      *
-     * <p>
-     * For \( x \leq 8 \), the implementation is based on the double precision
-     * implementation in the <em>NSWC Library of Mathematics Subroutines</em>,
-     * {@code DGAMLN}. For \( x \geq 8 \), the implementation is based on
-     * </p>
+     * <p>The implementation is based on</p>
      *
      * <ul>
      * <li><a href="https://mathworld.wolfram.com/GammaFunction.html";>Gamma
@@ -79,8 +75,10 @@ final class InternalGamma { // Class is package-private on 
purpose; do not make
      *     approximation</a></li>
      * </ul>
      *
-     * @param x Argument.
-     * @return \( \ln \Gamma(x) \), or {@code NaN} if {@code x <= 0}.
+     * <p>Warning: This method is not accurate when x is less than 8.
+     *
+     * @param x Argument (must be above 8).
+     * @return \( \ln \Gamma(x) \)
      */
     static double logGamma(double x) {
         // Stripped-down version of the same method defined in "Commons Math":

Reply via email to