Re: [PATCH] libstdc++: Avoid zero-probability events in discrete_distribution [PR61369]

2020-12-15 Thread Lewis Hyatt via Gcc-patches
internal __generate() function that presumably needs the same change as operator()(). This version modifies that one as well and adds a test case. Would you mind please reviewing this one instead? Thanks! -Lewis From: Lewis Hyatt Date: Tue, 1 Dec 2020 11:17:23 -0500 Subject: [PATCH] libstdc++: Av

Re: libstdc++: Avoid zero-probability events in discrete_distribution [PR61369]

2020-11-19 Thread Jonathan Wakely via Gcc-patches
s for sending it. bootstrap + testing were done on x86-64 GNU/Linux, all tests the same before + after plus 2 new passes from the new test. Thanks for taking a look! -Lewis From: Lewis Hyatt Date: Wed, 18 Nov 2020 17:12:51 -0500 Subject: [PATCH] libstdc++: Avoid zero-probability even

libstdc++: Avoid zero-probability events in discrete_distribution [PR61369]

2020-11-19 Thread Lewis Hyatt via Gcc-patches
] libstdc++: Avoid zero-probability events in discrete_distribution [PR61369] Fixes PR61369, as recommended by the PR's submitter, by replacing lower_bound() with upper_bound(). Currently, if there is an initial subset of events with probability 0, the first of them will be returned with non