File tree Expand file tree Collapse file tree
commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution Expand file tree Collapse file tree Original file line number Diff line number Diff 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":
You can’t perform that action at this time.
0 commit comments