delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/11/16/17:23:04

From: Kbwms AT aol DOT com
Message-ID: <8da1240a.3650a594@aol.com>
Date: Mon, 16 Nov 1998 17:22:12 EST
To: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Cc: djgpp-workers AT delorie DOT com
Mime-Version: 1.0
Subject: Re: src/libc/ansi/stdlib/rand.c
X-Mailer: AOL 3.0 16-bit for Windows sub 38
Reply-To: djgpp-workers AT delorie DOT com

Dear Martin Str|mberg,

On 11-16-98 at 16:01:45 EST you wrote:
> First my opinion: stick with the standard.
>
> Second my (potential) improvement: you say the seed is only 32 bits
> and the state is 64. How about using seed&(((long long)seed)<<32) or
> some other interesting combination to get a 64 bit seed? I do not know
> the effect on the pseudo-randomness this has. Perhaps K. B. can
> advice?


With an linear congruential random number generator, all seeds are equal.  
That includes 0.


K.B. Williams

- Raw text -


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