-
Notifications
You must be signed in to change notification settings - Fork 13.4k
XorShiftRng::new should use a non-constant seed #8359
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
Comments
I'm not entirely sure if it's ok to just seed with random numbers or not. Paper is here: http://www.jstatsoft.org/v08/i14/paper |
Apparently bad seeds make xorshift suck, so this may not be easy. |
FYI xorshift engines obviously work bad when w = x = y = z = 0. |
From skimming the paper, it suggests that the seeds can be drawn randomly from the set of integers, as long as they're not all 0. Looking at various results for Googling for "xorshift seed" seems to back this up. |
Rustup r? `@ghost` changelog: none
It appears that all XorShiftRng's are initialized with the same seed by default. Looks like a foot-gun to me.
The text was updated successfully, but these errors were encountered: