math/rand: add Rand.Uint64
This adds Uint64 methods to Rand and rngSource. Rand.Uint64 uses Source.Uint64 directly if it is present. rngSource.Uint64 provides access to all 64 bits generated by the underlying ALFG. To ensure high seed quality a 64th bit has been added to all elements of the array of "cooked" random numbers that are used for seeding. gen_cooked.go generates both the 63 bit and 64 bit array. Fixes #4254 Change-Id: I22855618ac69abae3d2799b3e7e59996d4c5a4b1 Reviewed-on: https://go-review.googlesource.com/27253 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Showing
This diff is collapsed.
Please register or sign in to comment