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

Is wy2u01 mistakenly not making use of all 53 bits? #149

Open
redoak opened this issue Mar 14, 2024 · 0 comments
Open

Is wy2u01 mistakenly not making use of all 53 bits? #149

redoak opened this issue Mar 14, 2024 · 0 comments

Comments

@redoak
Copy link

redoak commented Mar 14, 2024

Current implementation:

wy2u01(uint64_t r){ const double _wynorm=1.0/(1ull<<52); return (r>>12)*_wynorm;}

I believe this should be <<53 and >>11 in order to get the highest number of possible results (while still being evenly spaced).

See:

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

1 participant