Skip to content

xoshiro256p

xoshiro256p(seed): RandomFn

Defined in: xoshiro256p.ts:18

Creates a seeded pseudo-random number generator function using the xoshiro256+ algorithm by Blackman & Vigna (2018). 256-bit state, 64-bit output mapped to [0, 1).

Recommended for floating-point generation. The top 53 bits of the 64-bit output are used to preserve IEEE 754 double precision.

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 used to derive the four 64-bit state words.

RandomFn

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