Skip to content

[Random] Fix typo in _bits2float for Float32 #57337

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

Closed
wants to merge 1 commit into from

Conversation

giordano
Copy link
Member

Fix #57336. I don't know what a good test for this would be (besides testing exact values or allunique(rand(T, 4))?), suggestions welcome.

@giordano giordano added randomness Random number generation and the Random stdlib embarrassing-bugfix Whoops! labels Feb 10, 2025
@KristofferC
Copy link
Member

#57338 has a test as well which is perhaps a bit too specific but at least it tests that the change fixes the issue

@giordano giordano deleted the mg/rand-f32 branch February 10, 2025 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embarrassing-bugfix Whoops! randomness Random number generation and the Random stdlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rand(Float32, n) generates two values of the same number over and over when n is < 16
2 participants