*** fnvrand: a fast pseudo-random number generator / v2003-09-01
*** by Adam D. Moss <adam@gimp.org>

fnvrand is a pseudo-random number generator built primarily for speed
and secondarily for quite-good quality of random numbers.  It is very
simple.  It is written in ANSI C.

It generates about 30,000,000 random words per second on an
750MHz Athlon CPU.  The periodicity of the random sequence is
expected to be at least 2^32, probably vastly more (this is fairly
easily improved at the cost of speed simply by coding a larger seed type).

The 'secret' is that the random number is generated simply by
taking a rolling 32-bit FNV-1a (Fowler/Noll/Vo variant) hash of a
seed value.  Excess random bits are then XOR-folded.

Inter-call state is currently static for speed and simplicity.  This
code may expand to accept explicit user-passed state structures
at a later time.  The current programming interface is trivial, and
'documented' in the fnvrand.h header.

This pseudo-random number generator is not recommended for
cryptographic work.  You may more or less do with this code as you wish,
with no warranty of any kind; see the 'LICENSE' file for details.

fnvrand.c: The fnvrand implementation
fnvrand.h: Header file for the fnvrand implementation.
example.c: An example/benchmark of generating 100 million random words
README   : This file
LICENSE  : Conditions for use (X11/BSD style license)
Makefile : Simple makefile for building fnvrand and the example with gcc

Drop me an email if you like this.
Enjoy,
--Adam D. Moss <adam@gimp.org>

