From 17f52a2e559e68d5c6ccc98fcebb5523161fd0ed Mon Sep 17 00:00:00 2001 From: Gilles Date: Wed, 3 Dec 2014 12:06:03 +0100 Subject: [PATCH] MATH-1175 "LaplaceDistribution": Fixed special case of inverse cumulative distribution. --- src/changes/changes.xml | 7 +++++++ .../commons/math3/distribution/LaplaceDistribution.java | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 8ab9a1a9b..6d722a6ec 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -73,6 +73,13 @@ Users are encouraged to upgrade to this version as this release not 2. A few methods in the FastMath class are in fact slower that their counterpart in either Math or StrictMath (cf. MATH-740 and MATH-901). "> + + Fixed inverse cumulative probability of 0 in "LaplaceDistribution". + + + New classes "BicubicInterpolatingFunction" and "BicubicInterpolator" to + replace "BicubicSplineInterpolatingFunction" and "BicubicSplineInterpolator". + Fixed a problem with too thin polygons considered to have infinite size. diff --git a/src/main/java/org/apache/commons/math3/distribution/LaplaceDistribution.java b/src/main/java/org/apache/commons/math3/distribution/LaplaceDistribution.java index f8b935586..4badc0567 100644 --- a/src/main/java/org/apache/commons/math3/distribution/LaplaceDistribution.java +++ b/src/main/java/org/apache/commons/math3/distribution/LaplaceDistribution.java @@ -107,7 +107,7 @@ public class LaplaceDistribution extends AbstractRealDistribution { if (p < 0.0 || p > 1.0) { throw new OutOfRangeException(p, 0.0, 1.0); } else if (p == 0) { - return 0.0; + return Double.NEGATIVE_INFINITY; } else if (p == 1) { return Double.POSITIVE_INFINITY; }