From owner-freebsd-hackers Thu Oct 3 09:09:47 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA05459 for hackers-outgoing; Thu, 3 Oct 1996 09:09:47 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA05441 for ; Thu, 3 Oct 1996 09:09:38 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.7.6/8.6.9) id CAA20556; Fri, 4 Oct 1996 02:05:37 +1000 Date: Fri, 4 Oct 1996 02:05:37 +1000 From: Bruce Evans Message-Id: <199610031605.CAA20556@godzilla.zeta.org.au> To: ache@nagual.ru, joerg_wunsch@uriah.heep.sax.de Subject: Re: rand() and random() Cc: freebsd-hackers@freebsd.org, jmacd@CS.Berkeley.EDU Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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