Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Feb 2003 08:53:09 +0300
From:      "Andrey A. Chernov" <ache@nagual.pp.ru>
To:        Tim Robbins <tjr@FreeBSD.ORG>
Cc:        Kris Kennaway <kris@obsecurity.org>, current@FreeBSD.ORG
Subject:   Re: cvs commit: src/lib/libc/stdlib rand.c
Message-ID:  <20030217055309.GA28024@nagual.pp.ru>
In-Reply-To: <20030217164048.A28273@dilbert.robbins.dropbear.id.au>
References:  <200302170352.h1H3qawJ062671@repoman.freebsd.org> <20030217045729.GA68471@rot13.obsecurity.org> <20030217164048.A28273@dilbert.robbins.dropbear.id.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030217055309.GA28024>