Repository: commons-math
Updated Branches:
  refs/heads/master 10b1c517c -> c8f122c30


MATH-1175

"LaplaceDistribution": Fixed special case of inverse cumulative distribution.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/17f52a2e
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/17f52a2e
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/17f52a2e

Branch: refs/heads/master
Commit: 17f52a2e559e68d5c6ccc98fcebb5523161fd0ed
Parents: 428a485
Author: Gilles <er...@apache.org>
Authored: Wed Dec 3 12:06:03 2014 +0100
Committer: Gilles <er...@apache.org>
Committed: Wed Dec 3 12:06:03 2014 +0100

----------------------------------------------------------------------
 src/changes/changes.xml                                       | 7 +++++++
 .../commons/math3/distribution/LaplaceDistribution.java       | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/17f52a2e/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 8ab9a1a..6d722a6 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).
 ">
+      <action dev="erans" type="fix" issue="MATH-1175" due-to="Karsten 
Loesing">
+        Fixed inverse cumulative probability of 0 in "LaplaceDistribution".
+      </action>
+      <action dev="erans" type="add" issue="MATH-1166">
+        New classes "BicubicInterpolatingFunction" and "BicubicInterpolator" to
+        replace "BicubicSplineInterpolatingFunction" and 
"BicubicSplineInterpolator".
+      </action>
       <action dev="luc" type="fix" issue="MATH-1174" >
         Fixed a problem with too thin polygons considered to have infinite 
size.
       </action>

http://git-wip-us.apache.org/repos/asf/commons-math/blob/17f52a2e/src/main/java/org/apache/commons/math3/distribution/LaplaceDistribution.java
----------------------------------------------------------------------
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 f8b9355..4badc05 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;
         }

Reply via email to