On Fri, 9 Mar 2018 16:53:21 -0500, David Cogen wrote:
On 03/09/2018 04:35 PM, Matt Bru wrote:
I have a question about org.apache.commons.math3.random.BitsStreamGenerator.



nextDouble() documents:

“Returns the next pseudorandom, uniformly distributed double value
between 0.0 and 1.0 from this random number generator's sequence.”



Is this 0 (inclusive) and 1.0 (exclusive) as java.util.Random is?

The question is practically moot. If the generator is truly random,
then the chance of getting 0 or 1 are essentially zero even if running
at 1MHz for the lifetime of the universe!

Still, it would be nice if that was stated definitively.

I'd say "exclusive" but without any warranty. ;-)
The doc of "Commons RNG" has pointers to the references.
Review and patch welcome!

Regards,
Gilles


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to