Pragmastat v5.0.0 introduces a deterministic RNG system with xoshiro256++ for reproducible cross-language results, adds five probability distributions, and improves API safety by replacing panics with Result types.
Breaking Changes
- Rust:
pairwise_marginnow returnsResult<usize, &'static str>instead of panicking on invalid input - Rust:
fast_center,fast_shift, andfast_spreadmodules are now private (internal implementation details) - Go:
PairwiseMarginnow returns(int, error)instead of panicking
Features
- Deterministic RNG: All fast algorithms now use seeded RNG with FNV-1a hashing of input values, ensuring identical results across runs and platforms
- Rng class: New public API across all 7 languages with
uniform(),uniformInt(),shuffle(), andsample()operations - xoshiro256++ PRNG: High-quality pseudorandom number generator with SplitMix64 seeding
- Probability distributions: Added
Uniform,Exp,Additive,Multiplic, andPowerdistributions with inverse CDF sampling
Improvements
- Rust: NaN and infinite values now return proper errors instead of causing panics
- Rust: Uses
total_cmpinstead ofpartial_cmp().unwrap()for safer floating-point sorting - Build system: PDF tasks now depend on
img:buildto ensure images are compiled first - Logo: Updated with brighter cyan and violet gradient colors for better visibility
Bug Fixes
- Manual: Removed non-existent
.mdartifact from artifacts table - Image generation:
logo.svgis now preserved when regenerating figures
Documentation
- Added
AGENTS.mddevelopment guides for all 7 language implementations (Rust, Go, Python, TypeScript, C#, Kotlin, R) - Added comprehensive docstrings to Python estimator functions
- Updated all demos and READMEs to showcase RNG and distribution features
- Expanded manual with randomization algorithms (xoshiro256++, SplitMix64, FNV-1a, Fisher-Yates, reservoir sampling)
- Restructured manual: replaced estimators chapter with toolkit chapter, consolidated properties into studies chapter
Internal
- Added cross-language reference test fixtures for deterministic RNG verification
- Added comprehensive error handling tests for Rust implementation
- Removed obsolete
prompts/and.claude/commands/directories - Removed separate
Pragmastat.DistributionsC# project (consolidated into main library) - Updated tooling for new manual structure with xref module and improved math conversion
Full Changelog: https://github.com/AndreyAkinshin/pragmastat/compare/v4.0.3...v5.0.0