Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #132126

Re: KISS 64-bit pseudo-random number generator

From Krishna Myneni <krishna.myneni@ccreweb.org>
Newsgroups comp.lang.forth
Subject Re: KISS 64-bit pseudo-random number generator
Date 2024-09-10 19:30 -0500
Organization A noiseless patient Spider
Message-ID <vbqob3$384u0$1@dont-email.me> (permalink)
References <vblosf$292ru$1@dont-email.me> <7w7cblb9je.fsf@junk.nocrew.org> <0d6fd7afead1708921d74f60970bcf62@www.novabbs.com> <2024Sep9.105514@mips.complang.tuwien.ac.at>

Show all headers | View raw


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

Ref. [2] compares the performance of the following "high quality" PRNGs 
(Xorshift, Xorwow, Mersenne Twister, and additive lagged Fibonnaci 
generator (ALFG)) on simulation of other theoretical properties of large 
2D Ising models (32768 x 32768). They found the Xorshift PRNG to give 
much larger errors than the other PRNGs. "The other three tested PRNGs, 
Mersenne Twister, Xorwow, and ALFG, perform well ... staying mostly 
within a few standard errors of their theoretical values."

Note: I don't know what the difference is between Xorshift and R250 PRNGs.

--
Krishna

References

1. A. M. Ferrenberg, D. P. Landau, and Y. J. Wang, "Monte Carlo 
Simulations: Hidden Errors from 'Good' Random Number Generators," 
Physical Review Letters, vol. 69, p. 3382 (1992).

2. D. Zhu, Y. Lin, G. Sun, and F. Wang, "Critical exponents testing of a 
random number generator with the Wolff cluster algorithm," Journal of 
Statistical Mechanics: Theory and Experiment, 063202 (2024).


Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

KISS 64-bit pseudo-random number generator Krishna Myneni <krishna.myneni@ccreweb.org> - 2024-09-08 22:09 -0500
  Re: KISS 64-bit pseudo-random number generator Lars Brinkhoff <lars.spam@nocrew.org> - 2024-09-09 06:55 +0000
    Re: KISS 64-bit pseudo-random number generator mhx@iae.nl (mhx) - 2024-09-09 07:41 +0000
      Re: KISS 64-bit pseudo-random number generator anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2024-09-09 08:55 +0000
        Re: KISS 64-bit pseudo-random number generator mhx@iae.nl (mhx) - 2024-09-09 10:04 +0000
        Re: KISS 64-bit pseudo-random number generator albert@spenarnc.xs4all.nl - 2024-09-09 12:28 +0200
          Re: KISS 64-bit pseudo-random number generator anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2024-09-09 15:26 +0000
            Re: KISS 64-bit pseudo-random number generator albert@spenarnc.xs4all.nl - 2024-09-10 12:00 +0200
        Re: KISS 64-bit pseudo-random number generator Krishna Myneni <krishna.myneni@ccreweb.org> - 2024-09-10 19:30 -0500
          Re: KISS 64-bit pseudo-random number generator Krishna Myneni <krishna.myneni@ccreweb.org> - 2024-09-12 21:10 -0500
            Re: KISS 64-bit pseudo-random number generator Paul Rubin <no.email@nospam.invalid> - 2024-09-12 19:15 -0700
              Re: KISS 64-bit pseudo-random number generator mhx@iae.nl (mhx) - 2024-09-13 06:07 +0000
                Re: KISS 64-bit pseudo-random number generator Paul Rubin <no.email@nospam.invalid> - 2024-09-13 03:46 -0700
              Re: KISS 64-bit pseudo-random number generator minforth@gmx.net (minforth) - 2024-09-13 06:56 +0000
            Re: KISS 64-bit pseudo-random number generator Krishna Myneni <krishna.myneni@ccreweb.org> - 2024-09-18 19:28 -0500
              Re: KISS 64-bit pseudo-random number generator mhx@iae.nl (mhx) - 2024-09-19 06:33 +0000
                Re: KISS 64-bit pseudo-random number generator minforth@gmx.net (minforth) - 2024-09-19 08:18 +0000
                Re: KISS 64-bit pseudo-random number generator Krishna Myneni <krishna.myneni@ccreweb.org> - 2024-09-19 03:50 -0500
                Re: KISS 64-bit pseudo-random number generator albert@spenarnc.xs4all.nl - 2024-09-19 10:57 +0200
                Re: KISS 64-bit pseudo-random number generator Krishna Myneni <krishna.myneni@ccreweb.org> - 2024-09-19 06:45 -0500
                Re: KISS 64-bit pseudo-random number generator Krishna Myneni <krishna.myneni@ccreweb.org> - 2024-09-25 18:15 -0500
                Re: KISS 64-bit pseudo-random number generator Krishna Myneni <krishna.myneni@ccreweb.org> - 2024-09-25 20:45 -0500
    Re: KISS 64-bit pseudo-random number generator Krishna Myneni <krishna.myneni@ccreweb.org> - 2024-09-09 18:36 -0500

csiph-web