Date: Fri, 4 Oct 1996 02:05:37 +1000 From: Bruce Evans <bde@zeta.org.au> To: ache@nagual.ru, joerg_wunsch@uriah.heep.sax.de Cc: freebsd-hackers@freebsd.org, jmacd@CS.Berkeley.EDU Subject: Re: rand() and random() Message-ID: <199610031605.CAA20556@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>random() isn't good enough too. However the problem is different >with rand() case. The problem is that srandom() not accomodate >startup value well, i.e. produce the same _few_ sequences for _many_ >different startup values. I remember bug report related to this problem >(with suggested random() replacement) somewhere in freebsd mailing >lists long time ago. Another problem with srandom() is that it only gives 2^32 startup states. I think you're supposed to use initstate() for serious work. Don't know if this gives better startup sequences. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610031605.CAA20556>