Skip to main content

Module stats

Module stats 

Source
Expand description

Small shared numeric helpers.

These consolidate copy-pasted implementations that had identical semantics. Where existing local copies differ subtly (e.g. returning 0.0 rather than NAN for degenerate input, or computing a lower median instead of averaging the two central values) they are intentionally left in place — see the Phase-3b dedup notes.

Functions§

median
Median of v, sorting the slice in place.
std_dev
Sample standard deviation (divides by n − 1).