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_margin now returns Result<usize, &'static str> instead of panicking on invalid input
  • Rust: fast_center, fast_shift, and fast_spread modules are now private (internal implementation details)
  • Go: PairwiseMargin now 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(), and sample() operations
  • xoshiro256++ PRNG: High-quality pseudorandom number generator with SplitMix64 seeding
  • Probability distributions: Added Uniform, Exp, Additive, Multiplic, and Power distributions with inverse CDF sampling

Improvements

  • Rust: NaN and infinite values now return proper errors instead of causing panics
  • Rust: Uses total_cmp instead of partial_cmp().unwrap() for safer floating-point sorting
  • Build system: PDF tasks now depend on img:build to ensure images are compiled first
  • Logo: Updated with brighter cyan and violet gradient colors for better visibility

Bug Fixes

  • Manual: Removed non-existent .md artifact from artifacts table
  • Image generation: logo.svg is now preserved when regenerating figures

Documentation

  • Added AGENTS.md development 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.Distributions C# 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