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: possibly ambiguous use of operator "^" in documentation #35920
Comments
|
What @tmthrgd said. The doc says that all numbers of form Closing here, since this is working as intended. |
Hi @tmthrgd, and @ALTree Ok, and thank you for pointing this out. I actually had thought of the possibility of |
I guess it depends on the context. I admit it can be confusing, since in Go We could make this completely unambiguous, maybe using proper unicode superscripts. There is some precedent:
So we already use unicode superscripts in some places in the documentation. We could change the rand doc to
That would prevent any confusion. Re-opening as a doc issue. |
Ah yes, unicode superscript, like in math, perfect! Haven't thought of that. :-D |
Maybe |
Please use the Unicode superscript like in all our other docs, not <<. Thanks. |
Change https://golang.org/cl/209758 mentions this issue: |
According to the doc here https://golang.org/pkg/math/rand/#Seed
This means seed 29 and 57 will generate the same pseudo random sequence. But I get different results. Am I missing something?
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/AoWrOyO2rOP
What did you expect to see?
same pseudo random sequence
What did you see instead?
different results with seed 29 and 57
29: 3
57: 4
The text was updated successfully, but these errors were encountered: