delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/23/11:51:25

Message-Id: <m0yHACF-000S2qC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: G DOT DegliEsposti AT ads DOT it, djgpp AT delorie DOT com
Date: Mon, 23 Mar 1998 13:38:29 +0000
MIME-Version: 1.0
Subject: Re: real random numbers
In-reply-to: <C12565D0.0049181A.00@vega.ads.it>

G DOT DegliEsposti AT ads DOT it wrote:
> 
> >If anyone could tell me how to get REAL random generated numbers under
> >djgpp ... and/or explain me how it works ! I wonder for a long time how
> >a computer can generate random numbers
> 
> I would like to know it too! ;-)
> 
> Computers cannot generate real random numbers, what they can do is run some
> program in a deterministic way. (at least PCs do :-)

Hmmm... That isn't true, you can easilly create a random number generator using 
a diode and an A/D, or just sampling the enviroment sound ;-). There are a lot 
of cases like that, not all involves an A/D converter, some signals (not 
properlly grounded, etc) have random patterns. You can do it, but you need some 
hard.
 
> Random numbers on PCs are actually pseudo-random numbers. They are
> generated
> using some functions with particular mathematical properties:
> they return numbers very well distributed on a particular set of values and
> IIRC they return the original sequence of values only after a number of
> calls
> greater then the cardinality of the given set of values.
> 
> This makes the functions look like if they generate random numbers, but
> they actually don't!

And that's a feature because in this way you can test programs with random 
values more than ones and with the same values, or use an encripting methode 
using "random" numbers.

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
CQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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