commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [math] MATH-1178 (typo in userguide)
Date Mon, 08 Dec 2014 23:16:03 GMT
Repository: commons-math
Updated Branches:
  refs/heads/master c8f122c30 -> 5d6e44548


MATH-1178 (typo in userguide)

Fixed incorrect example in "stat" section.
[Reported by Dmitriy.]


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

Branch: refs/heads/master
Commit: 5d6e445484d75dad938cece6fd690427ea648203
Parents: c8f122c
Author: Gilles <erans@apache.org>
Authored: Tue Dec 9 00:13:28 2014 +0100
Committer: Gilles <erans@apache.org>
Committed: Tue Dec 9 00:13:28 2014 +0100

----------------------------------------------------------------------
 src/changes/changes.xml          | 3 +++
 src/site/xdoc/userguide/stat.xml | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/5d6e4454/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index aeb9551..5c086ce 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -73,6 +73,9 @@ 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-1178" due-to="Dmitriy">
+        Fixed example in userguide ("stat" section).
+      </action>
       <action dev="erans" type="fix" issue="MATH-1175" due-to="Karsten Loesing">
         Fixed inverse cumulative probability of 0 in "LaplaceDistribution".
       </action>

http://git-wip-us.apache.org/repos/asf/commons-math/blob/5d6e4454/src/site/xdoc/userguide/stat.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/userguide/stat.xml b/src/site/xdoc/userguide/stat.xml
index ce133cc..b93e0e1 100644
--- a/src/site/xdoc/userguide/stat.xml
+++ b/src/site/xdoc/userguide/stat.xml
@@ -196,7 +196,7 @@ double std = stats.getStandardDeviation();
 // Compute statistics directly from the array
 // assume values is a double[] array
 double mean = StatUtils.mean(values);
-double std = StatUtils.variance(values);
+double std = FastMath.sqrt(StatUtils.variance(values));
 double median = StatUtils.percentile(values, 50);
 
 // Compute the mean of the first three values in the array


Mime
View raw message