Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
math/rand: possibly ambiguous use of operator "^" in documentation #35920
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 (
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.