D wrapper for TestU01 random-number-generator test batteries

Joseph Rushton Wakeling via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed Nov 25 15:48:47 PST 2015


Hello all,

Recently I realized that TestU01 had been packaged in the latest 
Ubuntu, so for fun, I thought I'd have a little play with it and 
see if I could set up something to trial Phobos' uniform random 
number generators.

The (very, VERY) provisional results are here:
https://github.com/WebDrake/dtestu01

Note that these are not bindings in the conventional sense; I 
took a deliberate decision to expose as little of the library as 
possible, with the goal being only to expose those things 
necessary to pass Phobos RNGs into the test batteries.  Of 
course, I will happily consider extending the bindings (or 
accepting patches to do so) if anyone has a need for it.  It's 
not yet implemented as a dub package, but will be in the 
not-too-distant future.

The point here is that TestU01 provides a state-of-the-art means 
to validate the statistical quality of pseudo-random number 
generators, i.e. the extent to which these deterministic 
algorithms effectively mimic randomness.  These can be used to 
help ensure that Phobos implementations of RNG algorithms are up 
to scratch, and that the functionality we provide covers an 
appropriate range of algorithms quality-wise.

I'll continue to work on this as and when time allows; the 
results will probably be sporadic, but I hope the current public 
work will be useful to someone in the meantime.

Thanks & best wishes,

     -- Joe


More information about the Digitalmars-d-announce mailing list