MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Still bug in Random

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61777] Re: Still bug in Random
  • From: Joseph Gwinn <JoeGwinn at comcast.net>
  • Date: Sat, 29 Oct 2005 01:32:43 -0400 (EDT)
  • References: <djsk93$8lr$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <djsk93$8lr$1 at smc.vnet.net>,
 "Pedrob P.B. de Oliveira" <pedrob at mackenzie.br> wrote:

> I've just tried Mathematica 5.2 in respect to an old bug in Random[ ], as
> pointed out in the Mathgroup posting
> 
> Subject: [mg61777]  bug in Random 
> From: Veit Elser <ve10 at cornell.edu> 
To: mathgroup at smc.vnet.net
> 
> and the bad news is that the bug remains...
> 
> The problem is a correlation in the random numbers generated from running
> the expressions
> 
> r=Table[Random[Integer,{1,2^62}],{10^5}];
> Union[Table[r[[i]]+r[[i+24]]-r[[i+20]],{i,10^5-24}]]
> 
> which, surprisingly, yields simply
> 
> {-2147483647, 1, 2147483649, 4611686016279904256,4611686018427387904, 
> 4611686020574871552}

I wonder if the integer range of Random[] really supports integers 
larger than 32 bits.  If not, a random integer on the range 0..2^62 may 
not be very random.

If you really do need 62-bit integers, it may work better to make them 
from two 32-bit random integers.

Joe Gwinn


  • Prev by Date: Re: Integration over polytop
  • Next by Date: Re: spectra
  • Previous by thread: Still bug in Random
  • Next by thread: ParallelIO (mathlink windows program) Help Please