delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/11/16/15:02:33

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <199811162002.VAA22012@father.ludd.luth.se>
Subject: Re: src/libc/ansi/stdlib/rand.c
To: djgpp-workers AT delorie DOT com (DJGPP-WORKERS)
Date: Mon, 16 Nov 1998 21:02:06 +0100 (MET)
X-Mailer: ELM [version 2.4ME+ PL15 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

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?


Peter Gabriel, IV,

							MartinS

- Raw text -


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