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
rnd.wnext(long long n, int w) is broken when w <= -25 #76
Comments
Compare the implementation of the function
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The number distribution in
rnd.wnext(long long n, int w)
seems to be broken for negativew
when it exceedsrandom_t::lim;
(currently equal to25
). For positivew
, and forrnd.wnext(int n, int w)
the bug isn't reproducible.To reproduce the bug, compile and run the following code (C++14):
The output is:
As you can see, the results for
w=-25
greatly differ from others.The text was updated successfully, but these errors were encountered: