aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/database/sql/sql.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-05-19 12:30:25 -0400
committerRuss Cox <rsc@golang.org>2014-05-19 12:30:25 -0400
commit5aca0514941ce7dd0f3cea8d8ffe627dbcd542ca (patch)
treeb009934c2995cfcb533c54ff4a61ede5f9145618 /src/pkg/database/sql/sql.go
parent7f1d62dcefc868361e15db12608a8c8261be0e10 (diff)
downloadgo-5aca0514941ce7dd0f3cea8d8ffe627dbcd542ca.tar.xz
math/rand: restore Go 1.2 value stream for Float32, Float64
CL 22730043 fixed a bug in these functions: they could return 1.0 despite documentation saying otherwise. But the fix changed the values returned in the non-buggy case too, which might invalidate programs depending on a particular stream when using rand.Seed(0) or when passing their own Source to rand.New. The example test says: // These tests serve as an example but also make sure we don't change // the output of the random number generator when given a fixed seed. so I think there is some justification for thinking we have promised not to change the values. In any case, there's no point in changing the values gratuitously: we can easily fix this bug without changing the values, and so we should. That CL just changed the test values too, which defeats the stated purpose, but it was just a comment. Add an explicit regression test, which might be a clearer signal next time that we don't want to change the values. Fixes #6721. (again) Fixes #8013. LGTM=r R=iant, r CC=golang-codereviews https://golang.org/cl/95460049
Diffstat (limited to 'src/pkg/database/sql/sql.go')
0 files changed, 0 insertions, 0 deletions