-
-
Notifications
You must be signed in to change notification settings - Fork 32
Implementations of SFC32/SFC64 chaotic RNGs #65
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a glance, this seems like something we could add. But should we?
- I'd like some justification of why this is useful to people.
- Would you be willing to maintain this in case of future bug reports / requests?
rand_sfc/src/lib.rs
Outdated
@@ -0,0 +1,39 @@ | |||
// Copyright 2025 XXX. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfinished?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update that to mention the project now.
I would be willing to maintain this in the future. My reasons for suggesting they are included that they are simple, fast generators (in my experience and based on what I could find on the internet they are slightly faster than Xoshiro and faster than PCG), they are high quality, they are reasonably well known as far as I am aware, and they are structurally different from the existing generators present in rand. Additionally, in principle, stream support could be added as I mentioned in the comments, and this has been done by some people, but I don't think that functionality is very well studied. It is known that correlations exist early in two streams with different increments if the initial values provided for EDIT: I guess you knew all that already; I read the comments later where that was mentioned. Anyway I guess it had been talked about in the past and the thought was maybe one more choice would be nice? This implementation doesn't have the counter panic issue, anyway. |
This adds an implementation of the SFC32 and SFC64 chaotic RNGs.
There's some work left to be done regarding docs and formatting but they should work; I would like feedback on that.
EDIT: I'm also not even sure if this would be useful. One advantage it does have, perhaps, is that it does not require multiplication at all.