Random integer generation

Sisyphus kalinabears@hdc.com.au
Tue, 18 Feb 2003 17:28:32 +1100

----- Original Message -----
From: "Kevin Ryde" <user42@zip.com.au>
To: "Sisyphus" <kalinabears@hdc.com.au>
Cc: <gmp-discuss@swox.com>
Sent: Tuesday, February 18, 2003 9:37 AM
Subject: Re: Random integer generation

> "Sisyphus" <kalinabears@hdc.com.au> writes:
> >
> > randraw.c:144: GNU MP assertion failed: m2exp / (32 - 0) < ta
> > abnormal program termination
> Hmm.  Looks like if one is silly enough to pass an "a" which is more
> than a limb smaller than m2exp, and the current value (the seed) is
> small, then the product can be smaller than m2exp, tickling that
> assert.

If silliness is a prerequisite, then I'm the man for the job.
It was suggested to me (off list) that I read up on on linear congruential
generators in Knuth.
Sounds like reasonable advice.