1
0
mirror of https://github.com/golang/go synced 2024-11-19 15:24:46 -07:00
go/src/math/rand
David Chase 38255cbd1b math/rand: improve uniformity of rand.Float64,Float32
Replaced code that substituted 0 for rounded-up 1 with
code to try again.  This has minimal effect on the existing
stream of random numbers, but restores uniformity.

Fixes #12290.

Change-Id: Ib68f0b0a4a173339bcd0274cc16509f7b0977de8
Reviewed-on: https://go-review.googlesource.com/17670
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-12-11 15:17:42 +00:00
..
example_test.go
exp.go
normal.go
rand_test.go math/rand: make Rand fulfill the Reader interface 2015-09-16 17:54:01 +00:00
rand.go math/rand: improve uniformity of rand.Float64,Float32 2015-12-11 15:17:42 +00:00
regress_test.go math/rand: make Rand fulfill the Reader interface 2015-09-16 17:54:01 +00:00
rng.go
zipf.go math/rand: improve NewZipf documentation 2015-07-03 21:39:04 +00:00