Skip to content

Refine the seeding of the MWCX generators - #512

Merged
bashtage merged 1 commit into
bashtage:mainfrom
vigna:mwcx-seeding
Nov 8, 2026
Merged

bashtage merged 1 commit into
bashtage:mainfrom
vigna:mwcx-seeding

Conversation

@vigna

@vigna vigna commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Following up on #449, after the comments by Federico Busato on stream correlations, the reference implementation now suggests to fill the carry from the seed too, rather than setting it to one. Here the carry was already filled from the SeedSequence, but it was set to one when the resulting state was not valid (between 0.02% and 0.27% of the seeds, depending on the generator); now the value used for the carry is always mapped into the range of valid carries, as in the reference implementation and in the other ports. The improvement is minor, but it keeps the seeding uniform. Note that this changes the MWCX streams for a given seed with respect to 2.5.x, so it probably needs a release note. The test data and the stable hashes have been updated.

@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.80%. Comparing base (51c3967) to head (fbc18a9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #512   +/-   ##
=======================================
  Coverage   94.80%   94.80%           
=======================================
  Files          56       56           
  Lines        9922     9922           
  Branches      214      215    +1     
=======================================
  Hits         9407     9407           
  Misses        495      495           
  Partials       20       20           
Flag Coverage Δ
adder 94.74% <100.00%> (ø)
subtractor 94.74% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bashtage
bashtage merged commit c637dcc into bashtage:main Nov 8, 2026
47 checks passed
@bashtage

bashtage commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants