Repository: commons-math Updated Branches: refs/heads/master 26e611458 -> 44401d183
Made it clear that NaNs or infinities may yield NaN in moment computations. JIRA: MATH-1146. Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/44401d18 Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/44401d18 Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/44401d18 Branch: refs/heads/master Commit: 44401d183d6376a8b9eb5a81079e46f0f68325d4 Parents: 26e6114 Author: Phil Steitz <phil.ste...@gmail.com> Authored: Tue Dec 16 20:45:33 2014 -0700 Committer: Phil Steitz <phil.ste...@gmail.com> Committed: Tue Dec 16 20:45:33 2014 -0700 ---------------------------------------------------------------------- .../commons/math3/stat/descriptive/moment/FourthMoment.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-math/blob/44401d18/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FourthMoment.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FourthMoment.java b/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FourthMoment.java index 6c9b3ca..cf9d8ef 100644 --- a/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FourthMoment.java +++ b/src/main/java/org/apache/commons/math3/stat/descriptive/moment/FourthMoment.java @@ -44,7 +44,9 @@ import org.apache.commons.math3.util.MathUtils; * [n^2 - 3 * (n-1)] * dev^4 * (n-1) / n^3 </p> * <p> * Returns <code>Double.NaN</code> if no data values have been added and - * returns <code>0</code> if there is just one value in the data set. </p> + * returns <code>0</code> if there is just one value in the data set. Note that + * Double.NaN may also be returned if the input includes NaN and / or infinite + * values. </p> * <p> * <strong>Note that this implementation is not synchronized.</strong> If * multiple threads access an instance of this class concurrently, and at least