https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123409

--- Comment #7 from Infinity Integral <infinityintegral333 at gmail dot com> ---
lastly, replacing line 3475 in (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.n() / 2, 2));}

fixes std::student_t_distribution, example programme (attachment 64877) now
outputs
first average: 0.0288011
second average: 0.0231353
second average (new distribution): 0.0278829
for DEG_FREEDOM_AFTER = 100
the second average becomes 0.0259236 when DEG_FREEDOM_AFTER = 1000
and the second average becomes 0.0257733 when DEG_FREEDOM_AFTER = 10000

note that the average has stopped increasing

Reply via email to