On Tue, Apr 10, 2018 at 8:24 AM, Adam Mackler wrote:
>
> Maybe I'm missing something, but it seems to me that since a Double is
> represented using 64 bits and an Int 32, that using the amount of
> randomness in an Int to generate a random Double will mean that the results
> will be unevenly distr
Exercise 6.2 on page 83:
*Write a function to generate a Double between 0 and 1 , not including 1.*
The given hint and answer indicate generating a non-negative Int and then
dividing it by the one more than the maximum possible Int value.
Maybe I'm missing something, but it seems to me that si