home bbs files messages ]

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

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

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

   Message 68,109 of 68,980   
   Herbert Kleebauer to R.Wieser   
   Re: %random% is not random?   
   22 Oct 23 12:44:38   
   
   From: klee@unibwm.de   
      
   On 22.10.2023 11:48, R.Wieser wrote:   
   > Herbert,   
   >   
   >> If you switch on the Laptop every day at nearly the same time, you will   
   >> always see the same pictures. I wouldn't call this "random enough".   
   >   
   > In that case skipping the first result won't help much, if at all.   The   
   > second number might *look* random, but isn't - as its calculated from the   
   > first.    You just get a /different/ set of numbers.   
   >   
   > Look at it like this : Assuming you are always switching your laptop on in   
   > the same 15 minute timeframe.  By using the first result you get 15*60 = 900   
   > different(?) results.  If you use the second result than you will again only   
   > get 900 different(?) ones.  They will just be spread more thruout the full   
   > range.   
      
   You will get 900 different values, but in the form n, n+1, n+2, n+3 ...   
      
   Lets assume, there are 32768 pictures and you watch 1000 pictures and   
   the "random" numbers you get are 4000, 4001, ....4900, then the only   
   pictures you ever will see are pictures 4000-5900. But if you use   
   the second %random% value, you will see all 32768 pictures.   
      
   It is a bug to use the seed as the first random number!   
      
   --- 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