[libcxx-commits] [PATCH] D74997: [libc++] Bugfix to std::binomial_distribution<int>

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 11 13:01:59 PDT 2020


ldionne added a comment.

Thanks for your contribution!

What email address do you want this committed with? In the future, please consider using `arc diff` to upload patches, since that automatically handles attribution.

Also, I'll admit I am thorn apart on this change. One the one hand I can confirm it fixes the issue reported in PR44847, however I am not sure of what it does to the algorithm itself. Indeed, our tests for `<random>` are not exactly great, and I don't understand or have access to the algorithm that's implemented in `binomial_distribution`. So I can't say for sure that it doesn't have other side effects such as making `binomial_distribution` not binomial anymore, or similar. This is not a great place to be in.

Perhaps you can walk me through your thought process for deciding when the algorithm should break? @ericwf @mclow.lists have either of you fixed bugs like this in `<random>`? How do you do it?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74997/new/

https://reviews.llvm.org/D74997





More information about the libcxx-commits mailing list