[PATCH] Fix Bug 83237 - Values returned by std::poisson_distribution are not distributed correctly

Michele Pezzutti mpezz@tiscali.it
Sat Dec 23 22:11:00 GMT 2017


I got confirmation from Luc.
He also added it to the errata file---the entries regarding p. 511, page 
6 of http://luc.devroye.org/errors.pdf

On 12/14/2017 11:11 AM, mpezz@tiscali.it wrote:
> If Luc's explicit green light will not arrive before it is decision 
> time, Paolo's point 2- below is doable.
>
> Il 13.12.2017 12:51 Jonathan Wakely ha scritto:
>
>> On 12/12/17 21:37 +0100, Paolo Carlini wrote:
>>> Hi, On 12/12/2017 19:42, Michele Pezzutti wrote:
>>>> Hi. Yes, I looked at the text before submitting the patch. I 
>>>> contacted Devroye and he confirmed that another reader had also 
>>>> pointed out this bug but not the solution. I sent him my proposed 
>>>> patch, he will look into it (no idea when though).
>>> Nice.
>>>> I would state that "comparison function for x = 1 is e^(1/78)" 
>>>> (which becomes 1/78 as the algorithm uses log-probabilities). I 
>>>> think the change is needed because otherwise, for that particular 
>>>> bin, the rejection probability is lower than it should be, 
>>>> resulting in a higher number of samples.
>>> Ok. Ideally I would be much less nervous about committing the patch 
>>> if we either 1- Had Luc's explicit green light; 2- Were able to 
>>> *rigorously deduce* within the framework of the book why the change 
>>> is needed. That said, the patch makes sense to me and so far holds 
>>> up well in all my tests (I'm currently running a full make check). I 
>>> would say, let's wait a week or so and then make the final decision. 
>>> Jon, do you agree? Ideas about further testing? (eg, some code you 
>>> are aware of stressing Poisson?)
>> No, I have nothing useful to add here, but I CC'd Ed on the PR as I'd
>> like his input.
>>
>>
>



More information about the Libstdc++ mailing list