home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,370 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 243,218 of 243,370   
   Tim Rentsch to Michael S   
   Re: srand(0)   
   17 Feb 26 23:47:06   
   
   From: tr.17687@z991.linuxsc.com   
      
   Michael S  writes:   
      
   > On Tue, 03 Feb 2026 05:26:47 -0800   
   > Tim Rentsch  wrote:   
   >   
   >> Michael S  writes:   
   >>   
   >>> On Wed, 07 Jan 2026 08:41:25 -0800   
   >>> Tim Rentsch  wrote:   
   >>>   
   >>>> Michael S  writes:   
   >>>>   
   >>>>> On Tue, 23 Dec 2025 17:54:05 -0000 (UTC)   
   >>>>> antispam@fricas.org (Waldek Hebisch) wrote:   
   >>>>   
   >>>> [...]   
   >>>>   
   >>>>>> There is a paper "PCG:  A Family of Simple Fast Space-Efficient   
   >>>>>> Statistically Good Algorithms for Random Number Generation"   
   >>>>>> by M. O?Neill where she gives a family of algorithms and runs   
   >>>>>> several statistical tests against known algorithms.  Mersenne   
   >>>>>> Twister does not look good in tests.  If you have enough (128)   
   >>>>>> bits LCGs do pass tests.  A bunch of generators with 64-bit   
   >>>>>> state also passes tests.  So the only reason to prefer Mersenne   
   >>>>>> Twister is that it is implemented in available libraries.   
   >>>>>> Otherwise it is not so good, have large state and needs more   
   >>>>>> execution time than alternatives.   
   >>>>>   
   >>>>> I don't know.  Testing randomness is complicated matter.   
   >>>>> How can I be sure that L'Ecuyer and Simard's TestU01 suite tests   
   >>>>> things that I personally care about and that it does not test   
   >>>>> things that are of no interest for me?  Especially, the latter.   
   >>>>   
   >>>> Do you think any of the tests in the TestU01 suite are actually   
   >>>> counter-indicated?  As long as you don't think any TestU01 test   
   >>>> makes things worse, there is no reason not to use all of them.   
   >>>> You are always free to disregard tests you don't care about.   
   >>>   
   >>> Except that it's difficult psychologically.   
   >>> The batteries of test gains position of of authority in your mind.   
   >>> Well, may be, you specifically are resistant, but I am not.  Nor is   
   >>> Melissa O'Nail, it seems.   
   >>>   
   >>> To illustrate my point, I will tell you the story about myself.   
   >>> Sort of confession.   
   >>> [very large portion]   
   >>   
   >> I have read through your whole posting several times, and also   
   >> looked through your other postings in this thread.  Despite my   
   >> efforts I am still not sure what you think or what you're trying to   
   >> say.   
   >>   
   >> Let me put it as a question.  Do you think there is a good and   
   >> objective test for measuring the quality of a PRNG?  If so what test   
   >> (or tests) do you think would suffice?  Here "quality" is meant as   
   >> some sort of numeric measure, which could be a monotonic metric (as   
   >> in "the larger the number the higher the quality") or just a simple   
   >> pass/fail.   
   >   
   > I don't think that it is possible to create generic empirical tests   
   > of this sort.   
   > What is possible is a test that measures specific property that is   
   > known to be important for specific use.   
   >   
   >> If you don't think there is any such test, how do you propose that   
   >> PRNGs be evaluated?   
   >   
   > I don't know.   
   > But I believe in one philosophical principle that I learned first ~40   
   > years ago in the field unrelated to PRNGs or to Computer Science:   
   > when you don't know how to measure quality of your product then it is   
   > advisable to ask your consumer.  Do not ask a random consumer, ask the   
   > one who requested improvement of the property that you have   
   > difficulties to measure.  He is the most likely one to know.   
   >   
   > The field where I first heard about that principle was manufacturing   
   > of ultra-pure chemicals.   
      
   I'm surprised to see this answer from you, primarily because it   
   seems to confuse different aspects of the subject.   
      
   The key property of a (pseudo) random number generator is that the   
   values produced exhibit no discernible pattern.  Of course this   
   question cannot be answered absolutely, or more precisely it can be   
   answered definitely only in the negative.  Any affirmative answer   
   must be partial and also statistical rather than absolute.   
      
   If someone wants to write a PRNG for general use, there is no point   
   in asking users what they want, because they don't know.  Very few   
   people in the entire world have the mathematical sophistication   
   necessary to answer the question competently (I know I don't, and I   
   would put myself in the 75 percentile or above).  The sort of people   
   who could answer the question are also likely to have written test   
   suites like TestU01, so it seems reasonable to use one or more of   
   those test suites to establish a lower bar for any proposed general   
   pupose PRNG.   
      
   Of course there are properties besides statistical quality measures   
   that might be desirable, such as whether the state of the PRNG can   
   be readily ascertained, the size of the state space, various sorts   
   of cryptographic concerns, and so forth.  For some applications   
   there could be performance thresholds that are essential to meet,   
   such as how long to produce a new random value, or what the memory   
   footprint is.  But these concerns are outside the domain of the   
   question, which is only about the quality of the values produced.   
   Do you see now what I'm getting at?   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca