From owner-freebsd-hackers Mon Oct 7 14:18:26 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA29599 for hackers-outgoing; Mon, 7 Oct 1996 14:18:26 -0700 (PDT) Received: from sequent.kiae.su (sequent.kiae.su [193.125.152.6]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id OAA29587 for ; Mon, 7 Oct 1996 14:18:22 -0700 (PDT) Received: by sequent.kiae.su id AA06387 (5.65.kiae-2 ); Tue, 8 Oct 1996 01:16:45 +0400 Received: by sequent.KIAE.su (UUMAIL/2.0); Tue, 8 Oct 96 01:16:37 +0400 Received: (from ache@localhost) by nagual.ru (8.7.6/8.7.3) id BAA00770; Tue, 8 Oct 1996 01:13:34 +0400 (MSD) Message-Id: <199610072113.BAA00770@nagual.ru> Subject: Re: rand() and srand() In-Reply-To: <199610071921.VAA15800@uriah.heep.sax.de> from "J Wunsch" at "Oct 7, 96 09:21:04 pm" To: j@uriah.heep.sax.de (J Wunsch) Date: Tue, 8 Oct 1996 01:13:34 +0400 (MSD) Cc: freebsd-hackers@FreeBSD.org From: "=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=" (Andrey A. Chernov) Organization: self X-Class: Fast X-Mailer: ELM [version 2.4ME+ PL28 (25)] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > As Warner Losh wrote: > > > This tells me that if I give the same seed to srand() three times in a > > row, I will get the same pseudo random sequence out of it. > > > > If you are proposing that this change, then you are breaking existing > > code's assumptions. After all, it is documented to do this. > > This is also what ANSI requires. (And it requires that the default is > the same as can be achieved by ``srand(1)''.) > > Nothing else is required though. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I completely agree. -- Andrey A. Chernov http://www.nagual.ru/~ache/