# xoroshiro128StarStar

> **xoroshiro128StarStar**(`initialState`): [`Xoroshiro128StarStar`](/reference/knotkit/prng/interfaces/xoroshiro128starstar/)

Defined in: [packages/prng/src/xoroshiro128-star-star.ts:90](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/prng/src/xoroshiro128-star-star.ts#L90)

Create a xoroshiro128\*\* 1.0 pseudorandom number generator.

The two input words are reduced modulo 2^64. They must not both reduce to zero because the all-zero state is fixed and would only emit zeroes. Each call to `next()` runs in constant time, mutates the private 128-bit state, and returns the same unsigned 64-bit value as the reference C implementation.

`jump()` advances by 2^64 outputs and `longJump()` advances by 2^96 outputs. Both run in constant space and a fixed 128 state transitions.

This generator is not cryptographically secure. Use `crypto.getRandomValues()` when unpredictability matters.

## Parameters

### initialState

[`Xoroshiro128StarStarState`](/reference/knotkit/prng/type-aliases/xoroshiro128starstarstate/)

Two integers representing the initial 64-bit state words.

## Returns

[`Xoroshiro128StarStar`](/reference/knotkit/prng/interfaces/xoroshiro128starstar/)

A generator with private state and fixed-distance jump operations.

## Throws

With code `INVALID_STATE` when the state does not contain two bigints or both words reduce to zero modulo 2^64.
