Author: Andrey A. Chernov
Email: [EMAIL PROTECTED]
Message:
1) $r0 variable not works (always 0) because this line

if((i>0)&&(i<MAXRANDOM)){

prevents i == 0 and should be changed to

if((i>=0)&&(i<MAXRANDOM)){

2) Seeding RNG from time() only often produce the same number since rand() formulae 
not vary much from small seed changes, so the line:

srand((unsigned)tclock);

should be changed to something like

srand((unsigned)(tclock^getpid()));


Reply: <http://search.mnogo.ru/board/message.php?id=2075>

___________________________________________
If you want to unsubscribe send "unsubscribe general"
to [EMAIL PROTECTED]

Reply via email to