Date: Mon, 8 Dec 2025 17:23:04 +0100
pon., 8 gru 2025 o 07:10 Simon Schröder via Std-Proposals
<std-proposals_at_[hidden]> napisał(a):
>
>
>
> > On Dec 7, 2025, at 8:11 PM, Marcin Jaczewski via Std-Proposals <std-proposals_at_[hidden]> wrote:
> >
> > If we need to break implementations by changing standard, could the
> > standard at least require exact same results on every implementation?
> >
> I’m not sure if this is really the task of the standard. I think it is sufficient for the standard to provide a random number generator. If we prescribe too much we are closed off to improvements of random number generators. If you have non-standard requirements towards the random number generator use a different library that provides what you need. In fact I would claim that very few people know how to use a random number generator correctly (especially how to properly seed a random number generator). If I’m not mistaken there are only about a handful of different seeds for the Mersenne Twister that are proven to generate a truly uniform distribution. If you want a deep dive into random number generators, look at the TINA RNG and their papers.
> --
I was more thinking about some small "portable" subset of
distributions that could even be slower than normal one.
It could have a predefined algorithm and for floats require specific
rounding. This will affect performance as implantation will be needed
to be the same as naive implementation in most cases
but result always be the same for fixed seed.
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
<std-proposals_at_[hidden]> napisał(a):
>
>
>
> > On Dec 7, 2025, at 8:11 PM, Marcin Jaczewski via Std-Proposals <std-proposals_at_[hidden]> wrote:
> >
> > If we need to break implementations by changing standard, could the
> > standard at least require exact same results on every implementation?
> >
> I’m not sure if this is really the task of the standard. I think it is sufficient for the standard to provide a random number generator. If we prescribe too much we are closed off to improvements of random number generators. If you have non-standard requirements towards the random number generator use a different library that provides what you need. In fact I would claim that very few people know how to use a random number generator correctly (especially how to properly seed a random number generator). If I’m not mistaken there are only about a handful of different seeds for the Mersenne Twister that are proven to generate a truly uniform distribution. If you want a deep dive into random number generators, look at the TINA RNG and their papers.
> --
I was more thinking about some small "portable" subset of
distributions that could even be slower than normal one.
It could have a predefined algorithm and for floats require specific
rounding. This will affect performance as implantation will be needed
to be the same as naive implementation in most cases
but result always be the same for fixed seed.
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2025-12-08 16:23:17
