[erlang-questions] Implementation of a 2006 version of Wichmann-Hull random number generator for Erlang/OTP

Kenji Rikitake <>
Wed Nov 24 06:39:27 CET 2010


Richard and all:

Thanks for reminding us about the license.

I understand that the paper has already been published from Elsevier
(though it's not a public domain and behind the paywall), so the
algorithm (including the multiplier values) are open to the public.
The problem is that seeding values are in the coverage of NPL license.

I've already changed the initialization values on seed/0 in my source ASAP.
(tested it on my laptop)

Regards,
Kenji Rikitake

In the message <>
dated Wed, Nov 24, 2010 at 12:48:37PM +1300,
Richard O'Keefe <> writes:
> I made the mistake of downloading the reference implementation of
> the new Wichmann-Hill RNG.  Unfortunately, it is *licenced* software,
> with provisions like
> 
> 	The User may only make one copy of the Software and any
> 	associated written material, as a back up.
> 
> Arguably, this means that having downloaded it on my desktop machine,
> for which backups are *automatically* made, I do not have the right
> to copy it to my laptop.  Another restriction:
> 
> 	The User will not rent, lease, sublicense, transfer, resell
> 	the Software (either in whole or in part) or use it for
> 	commercial purposes without NPL’s prior written permission.
> 
> This pretty clearly means you can't put it in open source software.
> 
> It's not completely clear just what NPL intend here.  I wrote to
> Wichmann about it and he said that kind of stuff was outside his
> expertise, but if there was any doubt, change one of the primes.
> It's probably worth asking NPL formally if they have any problem
> with free implementations *not* derived from their code.
> 
> A thing that neither the 'small.pdf' nor the 'long.pdf' version of
> the paper that comes with the reference implementation discusses
> is how to initialise the generator.  They *do* describe how to set
> up multiple instances of the generator, *assuming* that you know
> how to set up a single instance.
> 
> The NPL package sets it from the time() function, which clearly
> provides at most 32 bits.  The generator has 16 bytes worth of
> state.  In C, it might be advisable to use gettimeofday() and
> get a few more bits.  To get the full range of possible RNG
> states, you're looking at using /dev/random.
> 
> 
> 
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:


More information about the erlang-questions mailing list