MathGroup Archive 2012

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

Search the Archive

Re: Using a huge list of random numbers from random.org

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127751] Re: Using a huge list of random numbers from random.org
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sat, 18 Aug 2012 03:47:04 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

On 8/17/12 at 3:44 AM, kbru157 at gmail.com wrote:

>I am doing some simulation which requires the use of random numbers.
>I do not want to use pseudo-random numbers.  Instead I intend to
>download some of the binary files from random.org
>http://www.random.org/files/ How do I use these digits within
>mathematica 8.0? (Subsidiary question:  How would one convert these
>binary digits into deimal fractions?)

The binary files there are simply a stream of random bytes. Use
BinaryRead or BinaryReadList to bring the file into Mathematica.
For example,

data=BinaryReadList[filename,"UnsignedInteger32"];

would read the file as a list of 32 bit integers with values
from 0 to 2^32-1. These could be converted to fractions by
dividing by 2^32. That is after reading the file as described

data/2^32//N

would be a list of random machine precision reals between 0 and 1




  • Prev by Date: Defining a total derivative
  • Next by Date: NIntegrate and replacements
  • Previous by thread: Re: Using a huge list of random numbers from random.org
  • Next by thread: Re: Using a huge list of random numbers from random.org