POV-Ray : Newsgroups : povray.general : Requesting ideas/opinions for RNG seeding syntax : Re: Requesting ideas/opinions for RNG seeding syntax Server Time
30 Jul 2024 20:25:49 EDT (-0400)
  Re: Requesting ideas/opinions for RNG seeding syntax  
From: Phoenex
Date: 24 May 2009 20:45:01
Message: <web.4a19e8de38187d7e26bf2d5d0@news.povray.org>
To Warp

Try to use the MOD function to do an algorithm like Alvo and giving the same
random numbers.
I dont think x = sx MOD 1.0 is the same as x = sx - INT(sx)
Thats one of many explanations why x = sx - INT(sx) algorithm is not an LCG.



To clipka

It is true that I have not spent much time in analysis of the seed mechanism,
even as other mathematical important analysis.
That is why I say on the page, that this algorithm should be subject to further
analysis by specialists.
However, I made 3 tests with your "s" that follow. Also with the Diehard test
the results are quit good with no p-values.


File generated with 2^24 bytes size
Test results by the ENT program with:

s=20000.1

Entropy = 7.999990 bits per byte.
Optimum compression would reduce the size
of this 16777216 byte file by 0 percent.
Chi square distribution for 16777216 samples is 234.59, and randomly
would exceed this value 81.57 percent of the times.
Arithmetic mean value of data bytes is 127.5264 (127.5 = random).
Monte Carlo value for Pi is 3.139572892 (error 0.06 percent).
Serial correlation coefficient is 0.000327 (totally uncorrelated = 0.0).

s=20000.0001

Entropy = 7.999989 bits per byte.
Optimum compression would reduce the size
of this 16777216 byte file by 0 percent.
Chi square distribution for 16777216 samples is 246.93, and randomly
would exceed this value 62.98 percent of the times.
Arithmetic mean value of data bytes is 127.5292 (127.5 = random).
Monte Carlo value for Pi is 3.140549932 (error 0.03 percent).
Serial correlation coefficient is 0.000338 (totally uncorrelated = 0.0).

s=20000.005
Entropy = 7.999989 bits per byte.
Optimum compression would reduce the size
of this 16777216 byte file by 0 percent.
Chi square distribution for 16777216 samples is 244.83, and randomly
would exceed this value 66.53 percent of the times.
Arithmetic mean value of data bytes is 127.4936 (127.5 = random).
Monte Carlo value for Pi is 3.141781602 (error 0.01 percent).
Serial correlation coefficient is -0.000335 (totally uncorrelated = 0.0).


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.