default random object?

Joel C. Salomon joelcsalomon at gmail.com
Sun Feb 15 11:01:18 PST 2009


Don wrote:
> There's a couple of difficult situations involving floating-point numbers.
<snip>
> * any floating point range which includes 0 is difficult, because there
> are so many numbers which are almost zero. The probability of getting a
> zero for an 80-bit real is so small that you probably wouldn't encounter
> it in your lifetime. I think this weakens arguments based on analogy
> with the integer case.

In that vein: for the floating-point case, do you want to emulate a
“true” uniform random distribution in the range [x, y), or make every
expressible IEEE 754 value in that range come out with equal likelihood?
One is the logarithm of the other, in some sense.

—Joel Salomon



More information about the Digitalmars-d mailing list