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

repair pseudo-random-generator-next! for large integers #831

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

mflatt
Copy link
Contributor

@mflatt mflatt commented Apr 29, 2024

For an argument exact integer greater than 4294967087, generation of a random integer by piecing together smaller random numbers was broken. It didn't cover the whole range uniformly, and by mistreating the largest part of the integer, it could always produce 0 (e.g., for (expt 2 32)).

Closes #830

@mflatt mflatt force-pushed the randint branch 2 times, most recently from 11a45de to 482fda0 Compare April 30, 2024 12:42
release_notes/release_notes.stex Outdated Show resolved Hide resolved
release_notes/release_notes.stex Outdated Show resolved Hide resolved
s/5_3.ss Outdated Show resolved Hide resolved
mats/5_3.ms Outdated Show resolved Hide resolved
mats/5_3.ms Outdated Show resolved Hide resolved
For an argument exact integer greater than 4294967087, generation of a
random integer by piecing together smaller random numbers was broken.
It didn't cover the whole range uniformly, and by mistreating the
largest part of the integer, it could always produce 0 (e.g., for
`(expt 2 32)`).

Closes cisco#830
Copy link
Contributor

@burgerrg burgerrg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed two more typos and pushed the commit. Feel free to squash & merge when you close this PR.

@mflatt
Copy link
Contributor Author

mflatt commented Apr 30, 2024

I fixed two more typos and pushed the commit.

Thank you!

@mflatt mflatt merged commit 66c40f1 into cisco:main Apr 30, 2024
15 checks passed
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

Successfully merging this pull request may close these issues.

new RNG is very broken
2 participants