Skip to content

splitmix64

splitmix64(seed): RandomFn

Defined in: splitmix64.ts:18

Creates a seeded pseudo-random number generator function using the SplitMix64 algorithm by Guy Steele and Sebastiano Vigna. Single 64-bit state word, 64-bit output.

Commonly used to expand a single integer seed into an initial state for multi-word generators such as xoshiro256+. Fast and passes BigCrush.

The seed is accepted as a JS number; values above 2^53 may lose precision due to IEEE 754 double representation before the BigInt conversion.

number

The seed value to initialize the 64-bit internal state.

RandomFn

A function that generates pseudo-random numbers in the range [0, 1) when called.