Date: Thu, 26 Feb 2026 22:19:46 +0100
On 2/26/26 21:44, Sebastian Wittmeier via Std-Proposals wrote:
> Sorry for my ignorance, but don't all random number generators have a larger internal state than the size of the returned random value?
Linear congruential generators have been popular for a decade or more in the past,
and their internal state is just an "int" (same as their returned value).
You can select the seed value to get different sequences.
Jens
> Otherwise they would always output the same series of numbers.
>
>
> -----Ursprüngliche Nachricht-----
> *Von:* Bjorn Reese via Std-Proposals <std-proposals_at_[hidden]>
> *Gesendet:* Do 26.02.2026 21:52
> *Betreff:* Re: [std-proposals] D4037R0 Allowing signed char and unsigned char in random number generation
> *An:* std-proposals_at_[hidden];
> *CC:* Bjorn Reese <breese_at_[hidden]>;
> On 2/26/26 21:26, Jan Schultke wrote:
>
> > Exactly as specified in the standard? For generators, I'm pretty sure
> > it's specified mathematically what they produce with perfect clarity.
>
> Although the various random generators are configurable, every possible
> configuration does not result in good random generators. The specialized
> random engines (e.g. mt19937) have been chosen very carefully, and are
> backed by peer-reviewd papers certifying their randomness.
>
> I have yet to see any good randomness results from 8-bit (or 16-bit)
> random generators.
>
> If you want these implementations to use 32-bit random generators under
> the hood, then maybe we are better off with a "downcasting" random
> adaptor.
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
>
> Sorry for my ignorance, but don't all random number generators have a larger internal state than the size of the returned random value?
Linear congruential generators have been popular for a decade or more in the past,
and their internal state is just an "int" (same as their returned value).
You can select the seed value to get different sequences.
Jens
> Otherwise they would always output the same series of numbers.
>
>
> -----Ursprüngliche Nachricht-----
> *Von:* Bjorn Reese via Std-Proposals <std-proposals_at_[hidden]>
> *Gesendet:* Do 26.02.2026 21:52
> *Betreff:* Re: [std-proposals] D4037R0 Allowing signed char and unsigned char in random number generation
> *An:* std-proposals_at_[hidden];
> *CC:* Bjorn Reese <breese_at_[hidden]>;
> On 2/26/26 21:26, Jan Schultke wrote:
>
> > Exactly as specified in the standard? For generators, I'm pretty sure
> > it's specified mathematically what they produce with perfect clarity.
>
> Although the various random generators are configurable, every possible
> configuration does not result in good random generators. The specialized
> random engines (e.g. mt19937) have been chosen very carefully, and are
> backed by peer-reviewd papers certifying their randomness.
>
> I have yet to see any good randomness results from 8-bit (or 16-bit)
> random generators.
>
> If you want these implementations to use 32-bit random generators under
> the hood, then maybe we are better off with a "downcasting" random
> adaptor.
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
>
Received on 2026-02-26 21:20:03
