Improve test slightly

This commit is contained in:
Vinzent Steinberg 2018-01-11 19:25:25 +01:00
parent 0d6cf939d1
commit 383c85c470

View File

@ -43,6 +43,7 @@ fn simple() {
assert_eq!(a.standardized_moment(1), 0.0); assert_eq!(a.standardized_moment(1), 0.0);
assert_eq!(a.standardized_moment(2), 1.0); assert_eq!(a.standardized_moment(2), 1.0);
assert_almost_eq!(a.sample_skewness(), 0.0, 1e-15); assert_almost_eq!(a.sample_skewness(), 0.0, 1e-15);
assert_almost_eq!(a.standardized_moment(3), 0.0, 1e-15);
a.add(1.0); a.add(1.0);
// skewness // skewness
assert_almost_eq!(a.standardized_moment(3), 0.2795084971874741, 1e-15); assert_almost_eq!(a.standardized_moment(3), 0.2795084971874741, 1e-15);