threePass
import mir.math.common: approxEqual, sqrt; import mir.math.sum: Summation; import mir.ndslice.slice: sliced; auto x = [0.0, 1.0, 1.5, 2.0, 3.5, 4.25, 2.0, 7.5, 5.0, 1.0, 1.5, 0.0].sliced; auto v = SkewnessAccumulator!(double, SkewnessAlgo.threePass, Summation.naive)(x); assert(v.skewness(true).approxEqual(12.000999 / 12)); assert(v.skewness(false).approxEqual(12.000999 / 12 * sqrt(12.0 * 11.0) / 10.0));