View Single Post
Re: srand() aberration ???
Old
  (#5)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: srand() aberration ??? - 14-06-2004

yep, doing a modulo isnt good since there are then numbers ( 65537 e.g. when the biggest is 65538 ) which are not possible, therefore not all values inside 0-100 will have the same probability. Although it's not a big deal when having RAND_MAX somewhere at 2^16 and the modulo @100


  
Reply With Quote