Skip to content

math/rand: document which bits of seed are used #15788

@aarondl

Description

@aarondl
  1. What version of Go are you using (go version)?
    1.6.2 (1.6.0 has the same issue)
  2. What operating system and processor architecture are you using (go env)?
    GOHOSTARCH="amd64"
    GOHOSTOS="linux"
    Ubuntu 14.04.02 Trusty
  3. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
    A link on play.golang.org is best.
    https://play.golang.org/p/JSKCIMotEE
  4. What did you expect to see?
    A different output string, and a different sequence of integers in the array.
  5. What did you see instead?
    The exact same output string, and the exact same sequence of integers in the array.

Basically using a different seed (especially one that's numerically quite different) should probably generate a different random sequence. It's very possible that that's just a limitation of the algorithm and that's life but just in case this is actually a bug I wanted to file it so at least someone with more knowledge than me could confirm it either way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions