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

Wrong precedence #2

Closed
vigna opened this issue Jan 30, 2020 · 1 comment
Closed

Wrong precedence #2

vigna opened this issue Jan 30, 2020 · 1 comment

Comments

@vigna
Copy link

vigna commented Jan 30, 2020

if internal.Jump128[i]&uint64(1)<<b != 0 {

Someone make my notice that the precedence here is wrong. The code is not equivalent to my C code.

For PRNGs, I always suggest some unit testing based on another implementation (like, 10 values must be the same given a seed). It's very easy to slip.

@vpxyz
Copy link
Owner

vpxyz commented Feb 27, 2020

Fixed, thanks!

@vpxyz vpxyz closed this as completed Feb 27, 2020
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

No branches or pull requests

2 participants