( xsI: Iterable<number>, ysI: Iterable<number>, population: boolean )
| 302 | if (unit === undefined) unit = e; |
| 303 | else if (e > unit) { |
| 304 | const k = unit - e; |
| 305 | mean = scaleByPowerOfTwo(mean, k); |
| 306 | m2 = scaleByPowerOfTwo(m2, 2 * k); |
| 307 | m3 = scaleByPowerOfTwo(m3, 3 * k); |
| 308 | m4 = scaleByPowerOfTwo(m4, 4 * k); |
| 309 | unit = e; |
| 310 | } |
| 311 | } |
| 312 | const u = unit === undefined ? 0 : scaleByPowerOfTwo(y, shift - unit); |
| 313 | const before = n; |
| 314 | n += 1; |
| 315 | const delta = u - mean; |
| 316 | const deltaN = delta / n; |
| 317 | const deltaN2 = deltaN * deltaN; |
| 318 | const term = delta * deltaN * before; |
| 319 | mean += deltaN; |
| 320 | // `M4` uses the values of `M2` and `M3` before this update, and `M3` |
| 321 | // uses the value of `M2` before this update. |
| 322 | m4 += |
| 323 | term * deltaN2 * (n * n - 3 * n + 3) + 6 * deltaN2 * m2 - 4 * deltaN * m3; |
| 324 | m3 += term * deltaN * (n - 2) - 3 * deltaN * m2; |
| 325 | m2 += term; |
no outgoing calls
no test coverage detected