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,242 messages   

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

   Message 242,607 of 243,242   
   Paul to All   
   Re: srand(0)   
   26 Dec 25 01:52:15   
   
   From: nospam@needed.invalid   
      
   On Fri, 12/26/2025 12:42 AM, Lawrence D’Oliveiro wrote:   
   > On Thu, 25 Dec 2025 23:25:39 -0500, Paul wrote:   
   >   
   >> My CPU happens to have a random number generator running at   
   >> 500MB/sec.   
   >>   
   >> ...   
   >>   
   >> The Linux people happen not to like those, but, they exist anyway,   
   >> chugging away.   
   >   
   > Because it’s difficult to see how you can trust them.   
   >   
   > Not without thoroughly mashing them through something like this   
   > , anyway.   
   >   
      
   The claim was, that x86 processors didn't have anything.   
      
   They do have something.   
      
   And it has a source of entropy to do re-seed with.   
      
   Not all the Intel ones have the same arch.   
      
   And they're good enough for a "guess-a-number" game in C.   
      
   If you want a conventional "repeatable-upon-request" sequence,   
   then a regular PRNG can be used, and you can just make your   
   own if you're bored. As long as it doesn't have zeros sensitivity   
   (gets "stuck" in the all zeros state).   
      
   A general rule of thumb, is "quality random numbers take time".   
   Based on that, the 500MB/sec output I got from my processor,   
   I wouldn't be using that for any serious purpose, without   
   further study. I just thought it amusing that such a firehose   
   existed on the processor, not that such a rate was safe to use.   
      
      Paul   
      
   --- 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