-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[CUDA] Fix random generator routines for f32 and f64 to make sure the returned value is in [0, 1) #4243
Conversation
…ed value is in [0, 1)
✔️ Deploy Preview for docsite-preview ready! 🔨 Explore the source changes: 596f243 🔍 Inspect the deploy log: https://app.netlify.com/sites/docsite-preview/deploys/62035e4c0affcf0008382812 😎 Browse the preview: https://deploy-preview-4243--docsite-preview.netlify.app |
…ed value is in [0, 1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to undo the approve~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, just one typo. Thanks!
The typo is fixed. |
Currently the return value by
ti.random(f32)
(orti.random(f64)
) has a chance to be equal to 1.0, due to float precision problem. This PR fixes this problem.