Skip to content

Commit 616cfae

Browse files
committed
Comment partial implementation
1 parent 30342e9 commit 616cfae

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

  • commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution

commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InternalGamma.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,9 @@ final class InternalGamma { // Class is package-private on purpose; do not make
6161
private InternalGamma() {}
6262

6363
/**
64-
* Computes the function \( \ln \Gamma(x) \) for \( x \gt 0 \).
64+
* Computes the function \( \ln \Gamma(x) \) for \( x \geq 8 \).
6565
*
66-
* <p>
67-
* For \( x \leq 8 \), the implementation is based on the double precision
68-
* implementation in the <em>NSWC Library of Mathematics Subroutines</em>,
69-
* {@code DGAMLN}. For \( x \geq 8 \), the implementation is based on
70-
* </p>
66+
* <p>The implementation is based on</p>
7167
*
7268
* <ul>
7369
* <li><a href="https://mathworld.wolfram.com/GammaFunction.html">Gamma
@@ -79,8 +75,10 @@ private InternalGamma() {}
7975
* approximation</a></li>
8076
* </ul>
8177
*
82-
* @param x Argument.
83-
* @return \( \ln \Gamma(x) \), or {@code NaN} if {@code x <= 0}.
78+
* <p>Warning: This method is not accurate when x is less than 8.
79+
*
80+
* @param x Argument (must be above 8).
81+
* @return \( \ln \Gamma(x) \)
8482
*/
8583
static double logGamma(double x) {
8684
// Stripped-down version of the same method defined in "Commons Math":

0 commit comments

Comments
 (0)