delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/06/07:35:28

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Newbie Question: Random Numbers
Date: Wed, 06 Aug 1997 01:46:27 -0700
Organization: Alcyone Systems
Lines: 19
Message-ID: <33E839E3.38A0E28D@alcyone.com>
References: <01bc9a61$57701640$204678c7 AT warren1>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Warren Smith wrote:

> How can I get a truly random number (w/o the same sequence of numbers
> appearing over and over)?

This is fundamentally impossible with a computer without some strange
peripherals, because computers are designed to be deterministic.

There are many, many books written about "pseudorandom numbers," as
they'er called.  There's a whole chapter (chapter 7) in _Numerical
recipes_, for instance, devoted to this subject.

-- 
       Erik Max Francis, &tSftDotIotE / email / mailto:max AT alcyone DOT com
                     Alcyone Systems /   web / http://www.alcyone.com/max/
San Jose, California, United States /  icbm / 37 20 07 N  121 53 38 W
                                   \
   "Love is not love which alters / when it alteration finds."
                                 / William Shakespeare, _Sonnets_, 116

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019