From owner-freebsd-current Sun Feb 16 21:53:13 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 1097F37B401; Sun, 16 Feb 2003 21:53:12 -0800 (PST) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0E1C43F93; Sun, 16 Feb 2003 21:53:10 -0800 (PST) (envelope-from ache@pobrecita.freebsd.ru) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.7/8.12.7) with ESMTP id h1H5r9EJ028238; Mon, 17 Feb 2003 08:53:09 +0300 (MSK) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.7/8.12.6/Submit) id h1H5r9t0028237; Mon, 17 Feb 2003 08:53:09 +0300 (MSK) (envelope-from ache) Date: Mon, 17 Feb 2003 08:53:09 +0300 From: "Andrey A. Chernov" To: Tim Robbins Cc: Kris Kennaway , current@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/stdlib rand.c Message-ID: <20030217055309.GA28024@nagual.pp.ru> References: <200302170352.h1H3qawJ062671@repoman.freebsd.org> <20030217045729.GA68471@rot13.obsecurity.org> <20030217164048.A28273@dilbert.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030217164048.A28273@dilbert.robbins.dropbear.id.au> User-Agent: Mutt/1.5.1i 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 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. > 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. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message