looking for uniformly distributed (0..1] random number generator

Clark O. Morgan morgan at ogicse.cse.ogi.edu
Tue Jan 29 10:00:13 AEST 1991


Hello.  I'm currently using a Sequent Symmetry (3.17) executing
BSD4.2 :-) .  I need access to a uniformly distributed random number
generator over the range (0..1] .  The RNG should have a reasonably
long period.

I found a description of a Linear Congruential method that works fine
in theory, but suffers from unsigned long overflow in practice (unless,
of course, I implement the RNG is ASM :-( ).

Anybody have such a generator that's written in C (can't use Fortran,
our machine has no f77 compiler)?  Or have pointers to books/archives
that I should examine?

Thanks in advance.



More information about the Comp.unix.programmer mailing list