anchor.diff:  			    tl(R1)]),
       R2.
   
  -%% Generate float from given xorshift128plus internal state.
  +%% Advance xorshift128plus state for one step.
  +%% and generate 64bit unsigned integer from
  +%% the xorshift128plus internal state.
  +
  +-spec exsplus_next(exsplus_state()) -> {uint64(), exsplus_state()}.
  +exsplus_next([S1|S0]) ->
  +    %% Note: members s0 and s1 are swapped here
  +    S11 = (S1 bxor (S1 bsl 23)) band ?UINT64MASK,
  +    S12 = S11 bxor S0 bxor (S11 bsr 17) bxor (S0 bsr 26),
  +    {(S0 + S12) band ?UINT64MASK,
  +     [S0|S12]}.
   
   exsplus_uniform(R0) ->
       {I, R1} = exsplus_next(R0),
       {I / 18446744073709551616.0, R1}.
   
  -%% Generate integer from given xorshift128plus internal state.
  -
   exsplus_uniform(Max, R) ->
       {V, R1} = exsplus_next(R),
       {(V rem Max) + 1, R1}.
  
positive.code: %% and generate 64bit unsigned integer from
  %% the xorshift1024star internal state.
  
  -spec exs1024_next(exs1024_state()) ->
          {uint64(), exs1024_state()}.
  
  exs1024_next({[S0,S1|L3], RL}) ->
      {X, NS1} = exs1024_calc(S0, S1),
  
negative.code:     R3 = R2 bxor (R2 bsr 27),
      {(R3 * 2685821657736338717) band ?UINT64MASK, R3}.
  
  exs64_uniform(R0) ->
      {V, R1} = exs64_next(R0),
      {V / 18446744073709551616.0, R1}.
  
  exs64_uniform(Max, R) ->
      {V, R1} = exs64_next(R),
      {(V rem Max) + 1, R1}.
  