<s>
Xorshift	B-Algorithm
random	O
number	O
generators	O
,	O
also	O
called	O
shift-register	O
generators	O
,	O
are	O
a	O
class	O
of	O
pseudorandom	B-Algorithm
number	I-Algorithm
generators	I-Algorithm
that	O
were	O
invented	O
by	O
George	O
Marsaglia	O
.	O
</s>
<s>
They	O
are	O
a	O
subset	O
of	O
linear-feedback	B-Architecture
shift	I-Architecture
registers	I-Architecture
(	O
LFSRs	B-Architecture
)	O
which	O
allow	O
a	O
particularly	O
efficient	O
implementation	O
in	O
software	O
without	O
the	O
excessive	O
use	O
of	O
sparse	O
polynomials	O
.	O
</s>
<s>
Like	O
all	O
LFSRs	B-Architecture
,	O
the	O
parameters	O
have	O
to	O
be	O
chosen	O
very	O
carefully	O
in	O
order	O
to	O
achieve	O
a	O
long	O
period	O
.	O
</s>
<s>
For	O
execution	O
in	O
software	O
,	O
xorshift	B-Algorithm
generators	O
are	O
among	O
the	O
fastest	O
non-cryptographically-secure	O
random	O
number	O
generators	O
,	O
requiring	O
very	O
small	O
code	O
and	O
state	O
.	O
</s>
<s>
Because	O
plain	O
xorshift	B-Algorithm
generators	O
(	O
without	O
a	O
non-linear	O
step	O
)	O
fail	O
some	O
statistical	O
tests	O
,	O
they	O
have	O
been	O
accused	O
of	O
being	O
unreliable	O
.	O
</s>
<s>
A	O
C	B-Language
version	O
of	O
three	O
xorshift	B-Algorithm
algorithms	O
is	O
given	O
here	O
.	O
</s>
<s>
However	O
,	O
it	O
fails	O
the	O
MatrixRank	O
and	O
LinearComp	O
tests	O
of	O
the	O
BigCrush	O
test	O
suite	O
from	O
the	O
TestU01	B-Algorithm
framework	O
.	O
</s>
<s>
All	O
xorshift	B-Algorithm
generators	O
fail	O
some	O
tests	O
in	O
the	O
BigCrush	O
test	O
suite	O
.	O
</s>
<s>
This	O
is	O
true	O
for	O
all	O
generators	O
based	O
on	O
linear	O
recurrences	O
,	O
such	O
as	O
the	O
Mersenne	B-Algorithm
Twister	I-Algorithm
or	O
WELL	B-Algorithm
.	O
</s>
<s>
For	O
general	O
purpose	O
,	O
the	O
scrambler	O
(	O
pronounced	O
starstar	O
)	O
makes	O
the	O
LFSR	B-Architecture
generators	O
pass	O
in	O
all	O
bits	O
.	O
</s>
<s>
This	O
performs	O
well	B-Algorithm
,	O
but	O
fails	O
a	O
few	O
tests	O
in	O
BigCrush	O
.	O
</s>
<s>
This	O
generator	O
is	O
the	O
default	O
in	O
Nvidia	O
's	O
CUDA	B-Architecture
toolkit	O
.	O
</s>
<s>
xoshiro256**	B-Algorithm
is	O
therefore	O
a	O
much	O
better	O
option	O
.	O
</s>
<s>
An	O
generator	O
can	O
achieve	O
an	O
order	O
of	O
magnitude	O
fewer	O
failures	O
than	O
Mersenne	B-Algorithm
Twister	I-Algorithm
or	O
WELL	B-Algorithm
.	O
</s>
<s>
A	O
native	O
C	B-Language
implementation	O
of	O
an	O
xorshift+	O
generator	O
that	O
passes	O
all	O
tests	O
from	O
the	O
BigCrush	O
suite	O
can	O
typically	O
generate	O
a	O
random	O
number	O
in	O
fewer	O
than	O
10	O
clock	O
cycles	O
on	O
x86	B-Operating_System
,	O
thanks	O
to	O
instruction	B-General_Concept
pipelining	I-General_Concept
.	O
</s>
<s>
The	O
idea	O
was	O
first	O
proposed	O
by	O
Saito	O
and	O
Matsumoto	O
(	O
also	O
responsible	O
for	O
the	O
Mersenne	B-Algorithm
Twister	I-Algorithm
)	O
in	O
the	O
generator	O
,	O
which	O
adds	O
two	O
consecutive	O
outputs	O
of	O
an	O
underlying	O
generator	O
based	O
on	O
32-bit	O
shifts	O
.	O
</s>
<s>
xoshiro	B-Algorithm
and	O
xoroshiro	O
use	O
rotations	O
in	O
addition	O
to	O
shifts	O
.	O
</s>
<s>
According	O
to	O
Vigna	O
,	O
they	O
are	O
faster	O
and	O
produce	O
better	O
quality	O
output	O
than	O
xorshift	B-Algorithm
.	O
</s>
<s>
The	O
algorithms	O
also	O
include	O
a	O
jump	O
function	O
,	O
which	O
sets	O
the	O
state	O
forward	O
by	O
some	O
number	O
of	O
steps	O
–	O
usually	O
a	O
power	O
of	O
two	O
that	O
allows	O
many	O
threads	B-Operating_System
of	I-Operating_System
execution	I-Operating_System
to	O
start	O
at	O
distinct	O
initial	O
states	O
.	O
</s>
<s>
For	O
32-bit	O
output	O
,	O
xoshiro128**	O
and	O
xoshiro128+	O
are	O
exactly	O
equivalent	O
to	O
xoshiro256**	B-Algorithm
and	O
xoshiro256+	B-Algorithm
,	O
with	O
in	O
place	O
of	O
,	O
and	O
with	O
different	O
shift/rotate	O
constants	O
.	O
</s>
<s>
They	O
are	O
used	O
in	O
some	O
implementations	O
of	O
Fortran	B-Application
compilers	B-Language
such	O
as	O
GNU	B-Operating_System
Fortran	B-Application
,	O
Java	B-Language
,	O
and	O
Julia	B-Application
.	O
</s>
<s>
xoshiro256**	B-Algorithm
is	O
the	O
family	O
's	O
general-purpose	O
random	O
64-bit	O
number	O
generator	O
.	O
</s>
<s>
It	O
is	O
used	O
in	O
GNU	B-Operating_System
Fortran	B-Application
compiler	B-Language
,	O
Lua	B-Language
,	O
and	O
the	O
.NET	B-Application
framework	O
(	O
as	O
of	O
.NET	B-Application
6.0	O
)	O
.	O
</s>
<s>
xoshiro256+	B-Algorithm
is	O
approximately	O
15%	O
faster	O
than	O
xoshiro256**	B-Algorithm
,	O
but	O
the	O
lowest	O
three	O
bits	O
have	O
low	O
linear	O
complexity	O
;	O
therefore	O
,	O
it	O
should	O
be	O
used	O
only	O
for	O
floating	O
point	O
results	O
by	O
extracting	O
the	O
upper	O
53	O
bits	O
.	O
</s>
<s>
If	O
space	O
is	O
at	O
a	O
premium	O
,	O
xoroshiro128**	O
and	O
xoroshiro128+	O
are	O
equivalent	O
to	O
xoshiro256**	B-Algorithm
and	O
xoshiro256+	B-Algorithm
.	O
</s>
<s>
Unlike	O
the	O
xoshiro	B-Algorithm
generators	O
,	O
they	O
are	O
not	O
straightforward	O
ports	O
of	O
their	O
higher-precision	O
counterparts	O
.	O
</s>
<s>
In	O
the	O
xoshiro	B-Algorithm
paper	O
,	O
it	O
is	O
recommended	O
to	O
initialize	O
the	O
state	O
of	O
the	O
generators	O
using	O
a	O
generator	O
which	O
is	O
radically	O
different	O
from	O
the	O
initialized	O
generators	O
,	O
as	O
well	B-Algorithm
as	O
one	O
which	O
will	O
never	O
give	O
the	O
"	O
all-zero	O
"	O
state	O
;	O
for	O
shift-register	O
generators	O
,	O
this	O
state	O
is	O
impossible	O
to	O
escape	O
from	O
.	O
</s>
