Re: KISS 64-bit pseudo-random number generator

Liste des GroupesRevenir à cl forth 
Sujet : Re: KISS 64-bit pseudo-random number generator
De : krishna.myneni (at) *nospam* ccreweb.org (Krishna Myneni)
Groupes : comp.lang.forth
Date : 13. Sep 2024, 03:10:43
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vc06v4$l19j$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : Mozilla Thunderbird
On 9/10/24 19:30, Krishna Myneni wrote:
On 9/9/24 03:55, Anton Ertl wrote:
mhx@iae.nl (mhx) writes:
On Mon, 9 Sep 2024 6:55:49 +0000, Lars Brinkhoff wrote:
>
[..]
I would like to recommend Marsaglia's newer and better xorshift family
of PRNGs, and preferably the further development by Sebastiano Vigna
called xoroshiro.  The output (with suitable parameters) is very good*,
yet the implementation is very simple.
...
Having better randomness at the same speed or better speed with
similar randomness is also relevant outside cryptographic
applications.
>
 Supposedly "good" PRNGs give large errors compared to theoretical values for some physics simulations. These errors have been studied for a 2D Ising model of ferromagnetism at the phase transition temperature, T = T_c (transition from ordered spins to disordered spins).
 Ref. [1] shows that a simple 32-bit congruential generator (CONG) gave more accurate answers for the average energy <E> and specific heat <C> of the model lattice in Monte-Carlo simulations than the supposedly superior R250 XOR based shift register generator or a subtract with carry generator (SWC) -- incidentally, the R250 generator is included in the FSL. All other things being the same for the simulations, the following errors (in std deviations) were observed with the different PRNGs:
 PRNG   error in <E>   error in <C>
CONG   -0.31             0.82
R250   42.09          -107.16
SWC   -16.95            32.81
 
...
I ran a simple Monte-Carlo integration of the area in a unit circle using the 64-bit LCG PRNG (from random.4th in kForth dist) and Marsaglia's 64-bit KISS PRNG. Hard to say which is better for this problem.
--
Krishna
=== Comparison of 64-bit LCG and KISS PRNGs ===
PRNG: RANDOM  (random.4th)
Ntrials   Area      log(error)
-------------------------------
10^2     3.28        -0.86
10^3     3.18        -1.42
10^4     3.1724      -1.51
10^5     3.14048     -2.95
10^6     3.14350     -2.72
10^7     3.14225     -3.18
10^8     3.14152     -4.14
PRNG: RAN-KISS (kiss.4th)
Ntrials   Area      log(error)
-------------------------------
10^2     3.24       -1.01
10^3     3.10       -1.38
10^4     3.1252     -1.79
10^5     3.14084    -3.12
10^6     3.14073    -3.06
10^7     3.14184    -3.61
10^8     3.14167    -4.11

Date Sujet#  Auteur
9 Sep 24 * KISS 64-bit pseudo-random number generator22Krishna Myneni
9 Sep 24 `* Re: KISS 64-bit pseudo-random number generator21Lars Brinkhoff
9 Sep 24  +* Re: KISS 64-bit pseudo-random number generator19mhx
9 Sep 24  i`* Re: KISS 64-bit pseudo-random number generator18Anton Ertl
9 Sep 24  i +- Re: KISS 64-bit pseudo-random number generator1mhx
9 Sep 24  i +* Re: KISS 64-bit pseudo-random number generator3albert
9 Sep 24  i i`* Re: KISS 64-bit pseudo-random number generator2Anton Ertl
10 Sep 24  i i `- Re: KISS 64-bit pseudo-random number generator1albert
11 Sep 24  i `* Re: KISS 64-bit pseudo-random number generator13Krishna Myneni
13 Sep 24  i  `* Re: KISS 64-bit pseudo-random number generator12Krishna Myneni
13 Sep 24  i   +* Re: KISS 64-bit pseudo-random number generator4Paul Rubin
13 Sep 24  i   i+* Re: KISS 64-bit pseudo-random number generator2mhx
13 Sep 24  i   ii`- Re: KISS 64-bit pseudo-random number generator1Paul Rubin
13 Sep 24  i   i`- Re: KISS 64-bit pseudo-random number generator1minforth
19 Sep 24  i   `* Re: KISS 64-bit pseudo-random number generator7Krishna Myneni
19 Sep 24  i    `* Re: KISS 64-bit pseudo-random number generator6mhx
19 Sep 24  i     +- Re: KISS 64-bit pseudo-random number generator1minforth
19 Sep 24  i     `* Re: KISS 64-bit pseudo-random number generator4Krishna Myneni
19 Sep 24  i      `* Re: KISS 64-bit pseudo-random number generator3Krishna Myneni
26 Sep 24  i       `* Re: KISS 64-bit pseudo-random number generator2Krishna Myneni
26 Sep 24  i        `- Re: KISS 64-bit pseudo-random number generator1Krishna Myneni
10 Sep 24  `- Re: KISS 64-bit pseudo-random number generator1Krishna Myneni

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal