Date: Thu, 26 Feb 2026 21:44:03 +0100
Sorry for my ignorance, but don't all random number generators have a larger internal state than the size of the returned random value?
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:01:34
