anchor.diff:      % this operation is sfmt_intstate() type dependent
       {I, I}.
   
  -%% With a given state,
  -%% Returns a uniformly-distributed float random number X
  -%% where `(X > 0.0)' and `(X < 1.0)'
  -%% and a new state
  +%% Generate 32bit-resolution float from the given SFMT internal state.
   
   sfmt_uniform(RS) ->
       {X, NRS} = sfmt_gen_rand32(RS),
       {(X + 0.5) * (1.0/4294967296.0), NRS}.
   
  -%% Returns a uniformly-distributed integer random number X
  -%% where (X >= 1) and (X =< N)
  -%% and a new state
  +%% Generate 32bit-resolution integer from the given SFMT internal state.
   
   sfmt_uniform(N, RS) ->
       {X, NRS} = sfmt_gen_rand32(RS),
       {trunc(X * (1.0/4294967296.0) * N) + 1, NRS}.
   
   %% =====================================================================
  -%% Tiny Mersennt Twister (TinyMT) PRNG
  +%% Tiny Mersenne Twister (TinyMT) PRNG
   %% Algorithm by Mutsuo Saito and Makoto Matsumoto
   %% Reference URL:
   %% http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/TINYMT/index.html
  
positive.code:     {exs1024_gen1024(
              (B1 bsl 43) bor (B2 bsl 22) bor (B3 bsl 1) bor 1), []}.
  
  %% {uniform_s, State} -> {F, NewState}:
  %% Generate float from
  %% given xorshift1024star internal state.
  %% (Note: 0.0 =&lt; result &lt; 1.0)
  
  exs1024_uniform(R0) ->
      {V, R1} = exs1024_next(R0),
      {V / 18446744073709551616.0, R1}.
  
  %% {uniform_s, N, State} -> {I, NewState}:
  %% @doc Generate integer from given xorshift1024star internal state.
  %% (Note: 0 =&lt; result &lt; MAX (given positive integer))
  
  exs1024_uniform(Max, R) ->
      {V, R1} = exs1024_next(R),
  
negative.code: 
  %%-----------------------------------------------------------------------
  
  %% algorithm handler functions
  
  tinymt_seed0() ->
      #tinymt_intstate32{status0 = 297425621, status1 = 2108342699,
  