Date: Mon, 17 Feb 2003 17:39:55 +1100 From: Tim Robbins <tjr@FreeBSD.ORG> To: "Andrey A. Chernov" <ache@nagual.pp.ru> Cc: Kris Kennaway <kris@obsecurity.org>, current@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/stdlib rand.c Message-ID: <20030217173955.A29826@dilbert.robbins.dropbear.id.au> In-Reply-To: <20030217055309.GA28024@nagual.pp.ru>; from ache@nagual.pp.ru on Mon, Feb 17, 2003 at 08:53:09AM %2B0300 References: <200302170352.h1H3qawJ062671@repoman.freebsd.org> <20030217045729.GA68471@rot13.obsecurity.org> <20030217164048.A28273@dilbert.robbins.dropbear.id.au> <20030217055309.GA28024@nagual.pp.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030217173955.A29826>