ISAAC64 is the 64-bit variant of ISAAC (Indirection, Shift, Accumulate, Add,
Count): same design as Isaac32 but on 64-bit words, giving a larger
state and 64-bit output. JavaScript has no native 64-bit integers, so each
64-bit word is split into two 32-bit lanes — *Hi (bits 63..32) and *Lo
(bits 31..0) — and the hot loop does 64-bit math with explicit carries in
plain numbers. That keeps the whole generator in fast Word32 arithmetic
(see the note on Isaac32's typed arrays); a bigint implementation is
~6x slower. next reassembles a bigint; sample skips bigint entirely.
The state is a plain object, so it can be inspected, cloned (to fork a
sequence), or serialised. The lanes are typed arrays, so a structural clone
(e.g. structuredClone) forks correctly; a shallow {...} copy shares them.
State of an ISAAC64 PRNG. Create one with create.
ISAAC64 is the 64-bit variant of ISAAC (Indirection, Shift, Accumulate, Add, Count): same design as Isaac32 but on 64-bit words, giving a larger state and 64-bit output. JavaScript has no native 64-bit integers, so each 64-bit word is split into two 32-bit lanes —
*Hi(bits 63..32) and*Lo(bits 31..0) — and the hot loop does 64-bit math with explicit carries in plainnumbers. That keeps the whole generator in fast Word32 arithmetic (see the note on Isaac32's typed arrays); abigintimplementation is ~6x slower.nextreassembles abigint;sampleskipsbigintentirely.The state is a plain object, so it can be inspected, cloned (to fork a sequence), or serialised. The lanes are typed arrays, so a structural clone (e.g.
structuredClone) forks correctly; a shallow{...}copy shares them.