🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2244

Re: Random number generation

#2244
From: Duke McMullan n5gax
Date: Sat, 15 Sep 1990 01:43
27 lines
1469 bytes
In article <20092@orstcs.CS.ORST.EDU> densond@prism.CS.ORST.EDU (Dave Denson)
writes:
>I need a way to generate suitably random numbers in an assembly language 
>program.

Hmmmmm. If you can handle 16-bit integer arithmetic efficiently .and. you can
use _floating_point_ numbers for the output (range is [0,1), I recall, very
uniform), then look in the March 87 issue of Byte.

The article is by Wichmann and Hill, and gives (I think) a Pascal implemen-
tation. Pages 127-8.

If you wish, email me, and I'll send you the C source I wrote from their
Pascal version. The algorithm is simple, but (according to the authors) very
effective. It's performed well for me, but I've not subjected to any stiff
testing.


						Best o' luck,
							d


--
  "...while I know many people who emphatically believe in reincarnation, I
have never met or read one who could satisfactorily explain population growth."
						-- Spider Robinson
   Duke McMullan n5gax nss13429r phon505-255-4642 ee5391aa@hydra.unm.edu
Technical Details
Message-ID: <1990Sep15.014316.1026@ariel.unm.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!unmvax!ariel.unm.edu!hydra.unm.edu!ee5391aa
References: <20092@orstcs.CS.ORST.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!aplcen!unmvax!ariel.unm.edu!hydra.unm.edu!ee5391aa
From: ee5391aa@hydra.unm.edu (Duke McMullan n5gax)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Random number generation
Message-ID: <1990Sep15.014316.1026@ariel.unm.edu>
Date: 15 Sep 90 01:43:16 GMT
References: <20092@orstcs.CS.ORST.EDU>
Sender: news@ariel.unm.edu (USENET News System)
Organization: University of New Mexico, Albuquerque
Lines: 27