From owner-freebsd-current Sat Mar 30 19:26:34 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id TAA09402 for current-outgoing; Sat, 30 Mar 1996 19:26:34 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id TAA09384 for ; Sat, 30 Mar 1996 19:26:28 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id NAA08023; Sun, 31 Mar 1996 13:20:26 +1000 Date: Sun, 31 Mar 1996 13:20:26 +1000 From: Bruce Evans Message-Id: <199603310320.NAA08023@godzilla.zeta.org.au> To: ache@astral.msk.su, bde@zeta.org.au Subject: Re: random .. not so .. Cc: current@FreeBSD.org, davidg@Root.COM, imb@scgt.oz.au Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk >> >> >I plan to aply proposed fix, if nobody against. >> >> It needs more thought. >What thought exactly do you mean? Think about rereading Knuth :-). >Calling srandom(time() f.e.) is common case. Without this fix two >programs calling srandom in _different_ times produces very predictable >almost same sequences. This must be a poor way to initialize random(). First, time() isn't random. Second, srandom() isn't claimed to give a state that varies randomly with its arg. In fact, it doesn't. Third, and more fundamentally, only 2**32 of random()'s (more than) 2**69 states are reachable using srandom(). Bruce