Re: Re: Quick "Random[]" question
- To: mathgroup at smc.vnet.net
- Subject: [mg41906] Re: [mg41885] Re: Quick "Random[]" question
- From: Bobby Treat <drmajorbob-MathGroup3528 at mailblocks.com>
- Date: Mon, 9 Jun 2003 05:20:52 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
That's exactly what I meant by infinitesimal. REALLY small. Bobby -----Original Message----- From: Bill Rowe <listuser at earthlink.net> To: mathgroup at smc.vnet.net Subject: [mg41906] [mg41885] Re: Quick "Random[]" question On 6/7/03 at 12:08 AM, drmajorbob-MathGroup3528 at mailblocks.com (Bobby Treat) wrote: >We'll never know, as the probability of it is infinitesimal (zero >theoretically, but in practice, infinitesimal). Actually, this may not be the case. The results of a call to Random with no arguments is a machine precision real. Since there is a finite number of machine precision numbers between any two other numbers, it follows the probability of anyone of them is 1/n where n = 2^(number of bits in the mantissa of a machine real) ~ 1/$MachineEpsilon (assuming well written code). The only issue I cannot address is whether the code specifically excludes 0.0 and 1.0 So; >But plan for the possibility. That is, don't write code that breaks >if it happens. is good advice