Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: Random Geometric (long)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23466] Re: [mg23340] Random Geometric (long)
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Thu, 11 May 2000 00:54:15 -0400 (EDT)
  • Organization: Wolfram Research, Inc.
  • References: <8fb089$hga@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

> ...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