Documentation
¶
Overview ¶
Package xoroshiro1024pp implements xoroshiro1024++ 1.0, one of our all-purpose, rock-solid, large-state generators. It is extremely fast and it passes all tests we are aware of. Its state however is too large--in general, the xoshiro256 family should be preferred.
For generating just floating-point numbers, xoroshiro1024* is even faster (but it has a very mild bias, see notes in the comments).
The state must be seeded so that it is not everywhere zero. If you have a 64-bit seed, we suggest to seed a splitmix64 generator and use its output to fill s.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source is a random source using xoroshiro1024++ algorithm.
Go port of http://prng.di.unimi.it/xoroshiro1024plusplus.c
Example ¶
package main
import (
"fmt"
"math/rand"
"github.com/shogo82148/randsrc/xoroshiro1024pp"
)
func main() {
var src xoroshiro1024pp.Source
src.Seed(1)
r := rand.New(&src)
for i := 0; i < 10; i++ {
fmt.Println(r.Int63())
}
}
Output: 3170740057973009359 4099357889825430042 5638365265662465543 4684694968524113019 5286072165563643916 8404018247976732837 7570187217392227886 5076094242191494162 5427123157498930871 1232801326997470226