MathGroup Archive 2000

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

Search the Archive

Re: Random Geometric (long)


> ...Regarding the implementation of Random-CA i have one question:
> 
> Why do you use
> 
> ((Random[Integer,2^30-1]/2^30.)+
>         Random[Integer,2^30-1])/2^30.
> 
> and not
> 
> (Random[Integer, 2^30 - 1]/2^30.)
> [...]

The latter will only generate 30 bits and machine double precision
numbers (which are what Random[] produces) have 53 bits of mantissa. So
we need a pair of the 30-bit entities in order to get enough bits for a
double.

Daniel Lichtblau
Wolfram Research


  • Prev by Date: Re: read/write numbered files
  • Next by Date: Re: subscripted symbols
  • Previous by thread: Re: Random Geometric (long)
  • Next by thread: subscripted symbols