diff --git a/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java b/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java index 01b338b4b..6e49fed21 100644 --- a/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java +++ b/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java @@ -290,15 +290,15 @@ public class GammaDistribution extends AbstractRealDistribution { /* * Natural calculation. */ - return densityPrefactor1 * FastMath.exp(-y) * - FastMath.pow(y, shape - 1); + return densityPrefactor1 * FastMath.exp(-y) * FastMath.pow(y, shape - 1); } /** {@inheritDoc} **/ @Override public double logDensity(double x) { - /* see the comment in {@link #density(double)} for computation details - */ + /* + * see the comment in {@link #density(double)} for computation details + */ if (x < 0) { return Double.NEGATIVE_INFINITY; } @@ -316,8 +316,7 @@ public class GammaDistribution extends AbstractRealDistribution { /* * Natural calculation. */ - return logDensityPrefactor1 - y + - FastMath.log(y) * (shape - 1); + return logDensityPrefactor1 - y + FastMath.log(y) * (shape - 1); } /**