| Deutsch English Français Italiano |
|
<vd25ij$3s0rd$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Krishna Myneni <krishna.myneni@ccreweb.org> Newsgroups: comp.lang.forth Subject: Re: KISS 64-bit pseudo-random number generator Date: Wed, 25 Sep 2024 18:15:31 -0500 Organization: A noiseless patient Spider Lines: 47 Message-ID: <vd25ij$3s0rd$1@dont-email.me> References: <vblosf$292ru$1@dont-email.me> <vcfr7j$91t8$1@dont-email.me> <a5254f7a5f00a0133c24e70330dabc04@www.novabbs.com> <vcgok8$gol7$1@dont-email.me> <nnd$76c078e1$19b846f5@d6ba8ec0a1ab68bc> <vch2sb$i6bm$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 26 Sep 2024 01:15:32 +0200 (CEST) Injection-Info: dont-email.me; posting-host="a7c03aaee466c85bd296880c3af1b9eb"; logging-data="4064109"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+XWx3ZqLGSS0G8OZxZ9uBn" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:hQL04Lx3MZ0K9oy4aNrpgGjiQ7s= Content-Language: en-US In-Reply-To: <vch2sb$i6bm$1@dont-email.me> Bytes: 3335 On 9/19/24 06:45, Krishna Myneni wrote: > On 9/19/24 03:57, albert@spenarnc.xs4all.nl wrote: >> In article <vcgok8$gol7$1@dont-email.me>, >> Krishna Myneni <krishna.myneni@ccreweb.org> wrote: >> <SNIP> >>> Moments of speed >>> N <v> (m/s) <v^2> (m/s)^2 <v^3> (m/s)^3 >>> 10^2 1181.0956 1656472.7 2604709063. >>> 10^3 1293.3130 1952149.7 3300955817. >>> 10^4 1259.3279 1862988.3 3108515117. >>> 10^5 1260.5577 1872157.8 3147664636. >>> 10^6 1259.4425 1868918.9 3139487337. >>> 10^7 1259.6136 1869145.0 3139092438. >> >> I think for a Monte Carlo simulation at least three tests >> must be done with different seeds. > > Good point. For a meaningful comparison of errors between PRNGs at a > specific N, the statistical variation of the <v^n> need to be measured > for different seed values. > > I can add some code to measure this sigma at each N, with 32 seeds > uniformly spaced between 0 and UMAX. > I've calculated the statistical variation in the moments for each set of N, using 16 different seeds (spaced apart over the interval for UMAX). The standard dev. for the 16 <v^i>, computed for N trials is comparable to the relative error between the moment and its theoretical value. Thus, the relative errors are indeed a meaningful comparison between the two prngs tested here, and I think this implies that for N > 10^5 the LCG PRNG (RANDOM) gives more accurate answers than the KISS 64 bit PRNG (RAN-KISS), for this problem. The LCG PRNG is faster than the KISS 64-bit PRNG. minforth stated earlier that he would prefer to use diehard tests to decide between which of these two PRNGs to use for computing these results from random trials. It will be interesting to see if diehard tests are consistent with what I find from actually using the PRNGs and comparing the results to the expected results (for large N and ideal PRNG). -- Krishna