Newsgroups: comp.lang.lisp
Subject: Random number generator
Distribution: comp.lang.lisp
--text follows this line--
Has anyone got a fast portable Lisp random number generator such as the
Park Miller multiplicative linear congruential algorithm (CACM, Oct '88, p
1192). It uses 31 bit arithmetic which is not available as fixnums on all
Lisps. The best i've come up with uses double-floats and conses 40 bytes.
Ideally, i'd like one that use 28 or 29 bits so it would work in fixnums in
most Lisps.
I know that RANDOM is portable, and i've looked at RANDOM-ONE from Chris
McConnell of CMU, but they are 10 and 5 times to slow respectively.
--
Ken Anderson
BBN STC
10 Moulton St.
Mail Stop 6/2c
Cambridge MA 02138
USA
Internet: ·········@bbn.com
Work Phone: 617-873-3160
Home Phone: 617-643-0157
FAX: 617-873-3776