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: document Rand output compatibility promise #14416
It seems from rand/regress_test.go that there is an explicit test to:
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?
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.