https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123409
--- Comment #5 from Infinity Integral <infinityintegral333 at gmail dot com> ---
note that replacing line 4406 in file (your install
location)/include/c++/13/bits/random.h, originally
{ _M_param = __param; }
with
{ _M_param = __param;
_M_gd.param(std::gamma_distribution<double>::param_type(__param.k(), (1.0 -
__param.p()) / __param.p()));}
fixes the bug for std::negative_binomial_distribution, my example programme
(attachment 64874) produces the following reasonable output after the line is
modified
first average: 33.653
second average: 2997.98
second average (new distribution): 3001.71