Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

math/rand: document Rand output compatibility promise #14416

Closed
dsnet opened this issue Feb 19, 2016 · 1 comment
Closed

math/rand: document Rand output compatibility promise #14416

dsnet opened this issue Feb 19, 2016 · 1 comment

Comments

@dsnet
Copy link
Member

@dsnet dsnet commented Feb 19, 2016

Using go1.6

It seems from rand/regress_test.go that there is an explicit test to:

Test that random number sequences generated by a specific seed do not change from version to version.

The public documentation for math/rand doesn't really saying anything about this. If there is a hard guarantee for deterministic output of Rand between versions of Go, can this be documented?

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Feb 19, 2016

I don't think we want that to be a hard guarantee. There is some discussion in issue #8013. We don't want to change the sequence gratuitously, but we don't necessarily want to lock ourselves into that exact sequence if there is ever a really good reason to change it. The test is there to make sure that we don't change the sequence accidentally.

@bradfitz bradfitz closed this Apr 10, 2016
@golang golang locked and limited conversation to collaborators Apr 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.