From owner-cvs-all Sat Feb 24 20: 3:31 2001 Delivered-To: cvs-all@freebsd.org Received: from gndrsh.dnsmgr.net (GndRsh.dnsmgr.net [198.145.92.4]) by hub.freebsd.org (Postfix) with ESMTP id 9C28F37B491; Sat, 24 Feb 2001 20:03:22 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.9.3/8.9.3) id UAA90904; Sat, 24 Feb 2001 20:03:21 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <200102250403.UAA90904@gndrsh.dnsmgr.net> Subject: Re: cvs commit: ports/astro/xglobe/files patch-random In-Reply-To: from Robert Watson at "Feb 24, 2001 10:55:24 pm" To: rwatson@FreeBSD.org (Robert Watson) Date: Sat, 24 Feb 2001 20:03:21 -0800 (PST) Cc: nsayer@FreeBSD.org (Nick Sayer), cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Hmm. I thought there was a BUGS section in rand(3), but apparently not -- > I must be thinking of some other operating system. We need to add one, > and I'm surprised there isn't one already. It's not in the BUGS section, but the man page is pretty explicit in a few places and: DESCRIPTION These interfaces are obsoleted by random(3). if you go read random(3) you'll find your ``BUGS'': BUGS About 2/3 the speed of rand(3). The historical implementation used to have a very weak seeding; the ran- dom sequence did not vary much with the seed. The current implementation employs a better pseudo-random number generator for the initial state calculation. > Robert N M Watson FreeBSD Core Team, TrustedBSD Project > robert@fledge.watson.org NAI Labs, Safeport Network Services > > On Sat, 24 Feb 2001, Nick Sayer wrote: > > > nsayer 2001/02/24 19:06:40 PST > > > > Added files: > > astro/xglobe/files patch-random > > Log: > > On my system(s), xglobe's stars show up in diagonal bands. I can only > > conclude that rand() is not very random. This patch makes xglobe use > > random() instead, and does a randomdev() in main() for good measure. > > > > Approved by: kris > > > > > > -- Rod Grimes - KD7CAX @ CN85sl - (RWG25) rgrimes@gndrsh.dnsmgr.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message