|
Packit |
67cb25 |
# -*- org -*-
|
|
Packit |
67cb25 |
#+CATEGORY: rng
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* gfsr: for consistency (Charles A. Wemple). Make this change in 2.0
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
127a142
|
|
Packit |
67cb25 |
> state->nd = i-1;
|
|
Packit |
67cb25 |
133,134c148,149
|
|
Packit |
67cb25 |
< for (i=0; i<32; ++i) {
|
|
Packit |
67cb25 |
< int k=7+i*3;
|
|
Packit |
67cb25 |
---
|
|
Packit |
67cb25 |
> for (i=0; i<32; i++) {
|
|
Packit |
67cb25 |
> int k=7*i+3;
|
|
Packit |
67cb25 |
141d155
|
|
Packit |
67cb25 |
< state->nd = i;
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* Sort out "const" in prototypes, it looks odd since there are consts
|
|
Packit |
67cb25 |
for many functions which modify the state. (Applies to both qrng and rng)
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* New 64 bit generators in "Tables of 64-bit Mersenne Twisters",
|
|
Packit |
67cb25 |
Takuji Nishimura, ACM Transactions on Modeling and Computer
|
|
Packit |
67cb25 |
Simulation, Volumen 10, No 4, October 2000, p 348--357
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* Need to run tests over the space of seeds, in addition to serial
|
|
Packit |
67cb25 |
tests (DIEHARD) for the default seed. The congruences used for
|
|
Packit |
67cb25 |
seeding will give poor initial vectors for some seed values, e.g. 2^n.
|
|
Packit |
67cb25 |
Improve the seeding procedure by using a high-quality generator
|
|
Packit |
67cb25 |
(e.g. hash functions, md5 or sha) to generate the initial vectors.
|
|
Packit |
67cb25 |
Even if this is moderately expensive it is worthwhile since the
|
|
Packit |
67cb25 |
seeding is usually a one-off cost at program initialization, and the
|
|
Packit |
67cb25 |
results of all subsequent calls to the generator depend on it. The
|
|
Packit |
67cb25 |
GSFR4 generator is particularly likely to benefit from this procedure.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* Add SWNS generator Phys.Rev.E 50 (2) p. 1607-1615 (1994), Phys.Rev.E
|
|
Packit |
67cb25 |
60 (6), p.7626-7628 (1999)
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* Add get_array type methods which can provide optimized versions of
|
|
Packit |
67cb25 |
each function (?). We should offer the possibility of eliminating
|
|
Packit |
67cb25 |
function call overhead -- there are various possible ways to implement
|
|
Packit |
67cb25 |
it.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* Add ISAAC generator (??)
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* Add (A)RC4 and hash based random number generators MD5, SHA. This
|
|
Packit |
67cb25 |
should give crypto quality randomness, and guarantee different
|
|
Packit |
67cb25 |
sequences for each seed. Make the state (seed, count) where count
|
|
Packit |
67cb25 |
increments on each call of the generator. Implement count as a big
|
|
Packit |
67cb25 |
integer stored in separate unsigned integers so that the period is
|
|
Packit |
67cb25 |
sufficiently long (e.g. 2^64 or 2^96). The generator would return
|
|
Packit |
67cb25 |
HASH(seed, count) on each call.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* Check that RANLXS will work on machines with non-standard width of
|
|
Packit |
67cb25 |
float/dbl (original has checks for DBL_MANT_DIG ..)
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* mention more clearly why not all Cokus used (or recheck MT pages for
|
|
Packit |
67cb25 |
improvements)
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* run the DIEHARD tests on all the generators, especially the ones we
|
|
Packit |
67cb25 |
are listing as "Simulation Quality" -- some of those are a bit old and
|
|
Packit |
67cb25 |
might fail one or two diehard tests.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* Add NAG, missing, gave up!
|
|
Packit |
67cb25 |
CDC 48-bit missing
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* Check out the bug fix to mrand48 that was made in glibc2, pr757
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* Check out the following paper,
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
On the anomaly of ran1() in Monte Carlo pricing of financial
|
|
Packit |
67cb25 |
derivatives; Akira Tajima , Syoiti Ninomiya , and Shu Tezuka ; Winter
|
|
Packit |
67cb25 |
simulation , 1996, Page 360, from ACM
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* The following papers have been published, I think we refer to them
|
|
Packit |
67cb25 |
(or could do),
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
Pierre L'Ecuyer, "Tables of Linear Congruential Generators of different
|
|
Packit |
67cb25 |
size and good lattice structure", Mathematics of Computation, Vol 68,
|
|
Packit |
67cb25 |
No 225, Jan 1999, p249-260
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
Pierre L'Ecuyer, "Tables of Maximally equidistributed combined LSFR
|
|
Packit |
67cb25 |
generators", ibid, p261-270
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* Look at this paper: I. Vattulainen, "Framework for testing random numbers
|
|
Packit |
67cb25 |
in parallel calculations", Phys. Rev. E, 59, 6, June 1999, p7200
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
----------------------------------------------------------------------
|
|
Packit |
67cb25 |
DONE
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
x1. Improve the seeding for routines that use the LCG seed generator.
|
|
Packit |
67cb25 |
It can only generate 130,000 different initial states. We should
|
|
Packit |
67cb25 |
change it to provide 2^31 different initial states (this will also
|
|
Packit |
67cb25 |
prevent the high bits being zero). DONE - we now use a 32-bit
|
|
Packit |
67cb25 |
generator.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
x8. Get the macros from the faster MT19937 generator and use them. We
|
|
Packit |
67cb25 |
need to make MT be the fastest of the simulation quality generators if
|
|
Packit |
67cb25 |
it is the default. DONE. It didn't improve the speed on other
|
|
Packit |
67cb25 |
platforms, so I just used the tricks which also worked on the pentium
|
|
Packit |
67cb25 |
(e.g. changing mag[x&1] to x&1 ? mag[1] : mag[0])
|