The original triple is `[13,17,5]` which don't existed in the Xorshift
RNG paper.
This CL use the right triple `[13,7,17]` for 64 bits RNG.
Fixes #70144
Change-Id: I3e3d475835980d9f28451ab73e3ce61eb2f1685e
Reviewed-on: https://go-review.googlesource.com/c/go/+/624295
Reviewed-by: Eli Bendersky <eliben@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: yunhao zhang <zhangyunhao116@gmail.com>
func (r *xorshift) Next() uint64 {
*r ^= *r << 13
- *r ^= *r >> 17
- *r ^= *r << 5
+ *r ^= *r >> 7
+ *r ^= *r << 17
return uint64(*r)
}
func (r *xorshift) Next() uint64 {
*r ^= *r << 13
- *r ^= *r >> 17
- *r ^= *r << 5
+ *r ^= *r >> 7
+ *r ^= *r << 17
return uint64(*r)
}