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: Documentation glitch for package math/rand #23363

Closed
vikramdurai opened this issue Jan 7, 2018 · 1 comment
Closed

math/rand: Documentation glitch for package math/rand #23363

vikramdurai opened this issue Jan 7, 2018 · 1 comment

Comments

@vikramdurai
Copy link

@vikramdurai vikramdurai commented Jan 7, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go1.9.2

Does this issue reproduce with the latest release?

I'm not sure.

What operating system and processor architecture are you using (go env)?

I don't know.

What did you do?

I ran the first example.
https://play.golang.org/p/nMDQEAaAnuX

What did you expect to see?

I expected the first example to produce random answers.

What did you see instead?

One answer ("As I see it yes") kept coming again and again.

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Jan 7, 2018

This is working as intended. It's a pseudorandom number generator package. Given the same seed, it'll produce the same output. Use crypto/rand for actual randomness. But note that the playground caches runs, so you can't see randomness on the playground..

@bradfitz bradfitz closed this Jan 7, 2018
@mikioh mikioh changed the title Documentation glitch for package math/rand math/rand: Documentation glitch for package math/rand Jan 13, 2018
@golang golang locked and limited conversation to collaborators Jan 13, 2019
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
3 participants
You can’t perform that action at this time.