Documentation
¶
Overview ¶
Package xoshiro256ss is xoshiro256** 1.0, one of our all-purpose, rock-solid generators. It has excellent (sub-ns) speed, a state (256 bits) that is large enough for any parallel application, and it passes all tests we are aware of.
For generating just floating-point numbers, xoshiro256+ is even faster.
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 xoshiro256** algorithm.
Go port of http://prng.di.unimi.it/xoshiro256starstar.c
Example ¶
package main
import (
"fmt"
"math/rand"
"github.com/shogo82148/randsrc/xoshiro256ss"
)
func main() {
src := xoshiro256ss.New([4]uint64{1})
r := rand.New(src)
for i := 0; i < 10; i++ {
fmt.Println(r.Int63())
}
}
Output: 0 2880 2880 377490240 101330991993323520 49671674268480 101380470016942080 1008855794931728384 6586539387786734400 6510565882661532660
Click to show internal directories.
Click to hide internal directories.