[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: your implementation of L'Ecuyer's MRG32k3a generator




Brad,

Thank you. Now I fully understand your code.

The revision of the SRFI I am preparing treats the floating point
issues more seriously. In the first place I was too biased towards
application in discrete structures (randomized datastructures)
and integer RNGs. This will be changed (together with some
other issues raised through the discussion list). There will be
some way to obtain random numbers from the open interval (0,1)
and to implement the underlying RNG with floats.

There is one other issue: What generator would you recommend
for a Scheme system with only 28-bit (or something) immediate
integers (and boxed arbitrary integers) and no floating point number
type? MRG32k3a is relatively slow on software integers and there is
a subtantial threat that people revert to some terrible generator just
because of speed and lack of alternative. In case you cannot rely
on the quality of the underlying generator, the SRFI becomes pointless.
However, from experience I know that better generators need not
be slower than bad generators.

The MRG methods of P. L'Ecuyer can readily be applied to create a
good generator for, say 28-bit arithmetics. But one needs to design
the recursion and moduli right, optimize and test the generator in
the end. I am reluctant of doing this myself--coming up with a new
generator is not my ambition here; and it is very dangerous, too.
Do you know of articles who have designed good generators for
28-bit arithmetics? Pierre L'Ecuyer has published some a couple
of years ago, but it was too much material for me to understand
what a good generator would be up to our standards of 2002.

Sebastian.