Alain <kua### [at] videotronca> wrote:
> Le 18-07-17 à 06:27, Kenneth a écrit :
> > I'm wondering about the documentation for rand(...).
> All values are equally possible, including 0 and 1. The mantissa for a
> float is about 52 bits IIRC, so, you have a 1 in 2^52 chances of getting
> a 0 and the same of getting a 1. Very small but not zero chance.
So then maybe round to the nearest Q decimal place to "compress" the range and
increase the likelihood of getting a 1 or a 0.
See this post in an old thread:
Post a reply to this message