[Python-ideas] Globally configurable random number generation

Robert Kern robert.kern at gmail.com
Mon Sep 14 17:50:15 CEST 2015

On 2015-09-14 16:39, Sturla Molden wrote:
> On 14/09/15 16:45, Random832 wrote:
>>> These functions aren't used widely in scientific computing.
>> I don't see how that's relevant, when what I'm talking about is
>> "providing an API that switches them from secure mode to
>> insecure/deterministic mode"
> It is not just a matter of security versus determinism. It is also a matter of
> numerical accuracy. The distribution of the output sequence must be proven and
> be as close as possible to the distribution of interest.
> MT19937 is loved by scientists because it emulates sampling from the uniform
> distribution so well. Faster alternatives exist, more secure alternatives too.
> But when we simulate a stochastic process we also care about numerical accuracy.
> MT19937 is considered state of the art for this purpose.

Actually, it's well behind the state of the art as it fails BigCrush. The 
proposed alternative does better in this regard.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

More information about the Python-ideas mailing list