From owner-freebsd-current Sun Feb 16 22:40: 3 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50F1937B401 for ; Sun, 16 Feb 2003 22:40:02 -0800 (PST) Received: from dilbert.robbins.dropbear.id.au (069.c.009.mel.iprimus.net.au [210.50.114.69]) by mx1.FreeBSD.org (Postfix) with ESMTP id F105D43F75 for ; Sun, 16 Feb 2003 22:39:59 -0800 (PST) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (6wz35rw4uv79jo4c@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id h1H6dumq030746; Mon, 17 Feb 2003 17:39:57 +1100 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id h1H6duWC030745; Mon, 17 Feb 2003 17:39:56 +1100 (EST) (envelope-from tim) Date: Mon, 17 Feb 2003 17:39:55 +1100 From: Tim Robbins To: "Andrey A. Chernov" Cc: Kris Kennaway , current@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/stdlib rand.c Message-ID: <20030217173955.A29826@dilbert.robbins.dropbear.id.au> References: <200302170352.h1H3qawJ062671@repoman.freebsd.org> <20030217045729.GA68471@rot13.obsecurity.org> <20030217164048.A28273@dilbert.robbins.dropbear.id.au> <20030217055309.GA28024@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030217055309.GA28024@nagual.pp.ru>; from ache@nagual.pp.ru on Mon, Feb 17, 2003 at 08:53:09AM +0300 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Feb 17, 2003 at 08:53:09AM +0300, Andrey A. Chernov wrote: > On Mon, Feb 17, 2003 at 16:40:48 +1100, Tim Robbins wrote: > > > I don't think rand() > > needs a warning message like gets() &c. because it's not as dangerous. > > Wait, what kind of warning __warn_references() produce? I was under > impression that it is compile-time only. I was referring to the __warn_references() warning in gets(), not the annoying message written to standard error. > > > What I suggest instead is to remove the pathetic "insults" in rand(3) > > ("bad" random number generator, obsoleted) and add a BUGS section > > which describes the problem. > > I agree. It can be done not instead only but in addition to compile > time warning. > > > I'd much prefer that rand() generated higher quality numbers, though. > > Current formulae generates acceptable quality numbers. Unlike in old > variant (which generates bad quality ones), the only problem remains is > first value monotonically increased with the seed. Here's an interesting picture of that: http://people.freebsd.org/~tjr/rand.gif Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message