I have reworked the patch in order to integrate it directly into the BetaDistribution class.
This involved a few variable renames, and I am clearly not sure I did it properly.
It seems the goodness of fit test failed in many cases. I finally selected some seeds for which it succeeded, just to make some progress here. This
is clearly not satisfaying. However, the patch has a side effect of making most random generator tests fail, as they share a common test based on beta distribution sampling. They all inherit this test from RandomDataGeneratorTest, the test is testNextInversionDeviate.
So my current state of mind is that I broke something while updating the patch, but I do not have the necessary skills to analyze it and even less to fix it.
Could someone look at my attempts. They are available on a
MATH-1153 branch in the git repository.
In the meantime, I propose to postpone this issue after 3.4.