delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/27/05:40:59

Message-ID: <351B900D.C369EE6@johnbryce.co.il>
Date: Fri, 27 Mar 1998 13:39:58 +0200
From: Noam Rotem <nrotem AT johnbryce DOT co DOT il>
Organization: John Bryce Training Centre L.T.D
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: real random numbers
References: <199803261827 DOT TAA14769 AT acp3bf DOT physik DOT rwth-aachen DOT de>


Hans-Bernhard Broeker wrote:

> > Does somebody know how to take care of getting a different value each
> > time you run a program, no matter how often in a single second you start
> > it ?
>
> That target is absolutely impossible to reach, I think. Reason: time()
> counts seconds (in DJGPP), and is 32 bits wide. The srandom argument
> is also a 32 bit number.

Can we somehow use the value of IP register combined with the time element to
set a better seed and  unpredictable  sequences of random numbers?

---
Noam Rotem

- Raw text -


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