Changes for version 0.19 - 2026-11-27
- Fix default PRNG seeding (previous setup(rand()) truncated to seed 0) by seeding from native OS entropy (BCryptGenRandom/RtlGenRandom on Windows, /dev/urandom on Unix) with a 32-bit-safe fallback that preserves $!, and automatically reseed the default RNG after fork() as well as ithreads CLONE.
- Use SvUV() in RdGen::setup_array() so full unsigned 32-bit seed words are preserved on 32-bit-IV Perls.
- Eliminate modulo/scaling index bias in do_resample() via Lemire's unbiased bounded 32-bit integer sampling.
- Propagate NaN deterministically across all input permutations in cs_select() and derived order statistics, and reject NaN in confidence level and approx_erf_inv() domain guards.
- Prevent signed 32-bit multiplication overflow in third_quartile() on very large samples.
- Upgrade mean() to Neumaier compensated summation with overflow-safe incremental fallback; upgrade standard deviation functions to scaled single-pass summation (avoiding overflow/underflow) and allow optional 1-argument calling form sample_standard_deviation(\@sample) and population_standard_deviation(\@sample).
- Replace low-precision erf/erfinv approximations with C99 erf()/erfc() and Acklam + Halley normal quantile refinement for full double precision across extreme tails.
- Add statistically sound, two-sided functions while preserving legacy functions for backward compatibility:
- quantile() (Hyndman-Fan Type 7 in O(n) expected time)
- percentile_confidence_limits_from_samples()
- basic_confidence_limits_from_samples()
- bca_confidence_limits_from_samples()
- median_percentile_confidence_limits()
- median_exact_confidence_limits() (exact Binomial(n, 0.5) interval)
- Add comprehensive statistical correctness test suite in t/04_statistics.t.
- Fix POD documentation inaccuracies and add statistical caveats.
Modules
Efficient resampling and calculation of medians with confidence intervals