From owner-freebsd-hackers Wed Feb 19 9:32:57 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0440B37B401; Wed, 19 Feb 2003 09:32:56 -0800 (PST) Received: from smtp-relay.omnis.com (smtp-relay.omnis.com [216.239.128.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DCBF43F85; Wed, 19 Feb 2003 09:32:55 -0800 (PST) (envelope-from wes@softweyr.com) Received: from salty.rapid.stbernard.com (corp-2.ipinc.com [199.245.188.2]) by smtp-relay.omnis.com (Postfix) with ESMTP id 46E5844859; Wed, 19 Feb 2003 09:22:18 -0800 (PST) From: Wes Peters Organization: Softweyr.com To: Peter Jeremy , Paul Herman Subject: Re: arc4random() range Date: Wed, 19 Feb 2003 09:22:18 -0800 User-Agent: KMail/1.5 Cc: FreeBSD Hackers , grog@freebsd.org References: <20030219013247.GA10910@x-anthony.com> <20030218180736.L240-100000@mammoth.eat.frenchfries.net> <20030219063646.GB62020@cirb503493.alcatel.com.au> In-Reply-To: <20030219063646.GB62020@cirb503493.alcatel.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200302190922.18146.wes@softweyr.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tuesday 18 February 2003 22:36, Peter Jeremy wrote: > > I see this as a major advantage of arc4random() - if I want 32-bit > random numbers I don't have to call random() twice and merge the > results. I've never understood why random() was specified to return > a '0' in the MSB. It probably had something to do with the PDP-11 architecture. This rings a bell, but I can't recall what it was. Greg Lehey might be able to help here, he has far better knowlege of the Good Old Days(tm) than I do. I'd ask Mike Murphy, the resident UNIX graybeard, but he's not in yet. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message