Ticket #5133 (closed bug: fixed)
Random instance for Float can generate values out of requested range
Description
Recently I was using the standard random number generator and found it that the program was breaking with an array index out of range.
I was using the Float data type not Double. The range was the basic (0,1) range. The test code is the following.
test :: Float test = let gen = read "1005320695 588518561" :: StdGen?
in fst $ random gen
Change History
Note: See
TracTickets for help on using
tickets.
