-
Notifications
You must be signed in to change notification settings - Fork 432
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
Higher quality (0, 1] floats #1346
Comments
So it uses a maximum of two steps, a bit like Canon's method. Might be generally preferable to #531, but probably still has a significant cost overhead? At any rate, it may be worth investigating (implementing and benchmarking at least), but not something I'm going to put on my to-do list. |
Initial benchmarks for
EDIT: testing done on a Zen3 x86_64 processor, but I didn't pass
|
Thanks. Overhead there is not negligible but is small enough that it could be offered as an alternative to the current implementation under a feature flag, if there is genuine interest in using it. |
Background
Motivation: It's possible to get higher-quality floats without having to add a loop.
Application: I don't have a concrete application, but this approach is able to generate floats < 2^-53, and does not generate 0, which should have a probability of 2^-1075. It can also generate more distinct floats than our current approach.
Feature request
Implement another (0, 1] distribution.
The text was updated successfully, but these errors were encountered: