[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] randomness in wg1
| Date: Fri, 5 Nov 2010 02:22:43 -0700 (PDT)
| From: Marco Benelli <mbenelli@x>
| I'd like to make some comments about randomness in wg1, recently
| discussed on wg1 mailing-list.
| It's true that prescribe a specific PRNG is unusual, but it could
| be justified by two reasons: a) the implementation is simple, b)
| today most of mainstream languages are defined by a single
| implementation (or a dominant one); I see great value in scheme not
| being defined this way, and if I understand correctly the steering
| committe position statement, the main goal of the report is to
| reduce the drawbacks of diversity of scheme's constituencies.
| Reliabilty of PRNG between implementations would be a huge step, at
| least for scientific computing, in the direction of "construct
| better programs in better ways: quickly, easily, robustly,
| scalably, correctly".
The SLIB portable PRNG documented at
Common-Lisp's PRNG. It has the properties:
* The random-state can be seeded from any string or number.
* From the same seed or random-state, all implementations return the
* The random-state is a byte-vector (length 258). Thus it is readable
and writable if byte-vectors are. If not, then replace the
byte-vector with a plain vector (which is then readable and
* Pseudo-random integers are generated using fixnum arithmetic.
Bignums are used only if RANDOM is called with a bignum.
* Psuedo-random floats in a variety of probability distributions are
generated using the integer generator.
* It passes Marsaglia's DieHard test suite.
Scheme-reports mailing list