Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MersenneTwister: hash seeds like for Xoshiro #51436

Merged
merged 2 commits into from
Sep 29, 2023
Merged

MersenneTwister: hash seeds like for Xoshiro #51436

merged 2 commits into from
Sep 29, 2023

Conversation

rfourquet
Copy link
Member

@rfourquet rfourquet commented Sep 23, 2023

This addresses a part of #37165:

It's common that sequential seeds for RNGs are not as independent as one might like.

This clears out this problem for MersenneTwister, and makes it easy to add the same feature to other RNGs via a new hash_seed function, which replaces make_seed.

This is an alternative to #37766.

This is draft, as tests must be fixed to accomodate for the changes in random streams; as I'm planning for another change breaking the streams, I will try to stack both PRs to avoid having to fix tests twice in a row.
EDIT: This was changed so as to not break the streams, so LinAlg tests should pass as is.

@rfourquet rfourquet added the domain:randomness Random number generation and the Random stdlib label Sep 23, 2023
This addresses a part of #37165:

> It's common that sequential seeds for RNGs are not as independent as one might like.

This clears out this problem for `MersenneTwister`, and makes it easy to
add the same feature to other RNGs via a new `hash_seed` function, which
replaces `make_seed`.

This is an alternative to #37766.
@rfourquet rfourquet marked this pull request as ready for review September 29, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:randomness Random number generation and the Random stdlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant