Date: Wed, 19 Feb 2003 09:22:18 -0800 From: Wes Peters <wes@softweyr.com> To: Peter Jeremy <peterjeremy@optushome.com.au>, Paul Herman <pherman@frenchfries.net> Cc: FreeBSD Hackers <hackers@FreeBSD.ORG>, grog@freebsd.org Subject: Re: arc4random() range Message-ID: <200302190922.18146.wes@softweyr.com> In-Reply-To: <20030219063646.GB62020@cirb503493.alcatel.com.au> References: <20030219013247.GA10910@x-anthony.com> <20030218180736.L240-100000@mammoth.eat.frenchfries.net> <20030219063646.GB62020@cirb503493.alcatel.com.au>
index | next in thread | previous in thread | raw e-mail
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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302190922.18146.wes>
