Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Remove a redundant op from tinymt32:next_state/1
Browse files Browse the repository at this point in the history
* Also fix indentation on tinymt32:next_state/1 and tinymt32:temper/1
  • Loading branch information
jj1bdx committed Sep 22, 2014
1 parent 6683dfb commit 384a70b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tinymt32.erl
Expand Up @@ -100,8 +100,8 @@

next_state(R) ->
Y0 = R#intstate32.status3,
X0 = (R#intstate32.status0 band ?TINYMT32_MASK)
bxor R#intstate32.status1 bxor R#intstate32.status2,
X0 = R#intstate32.status0
bxor R#intstate32.status1 bxor R#intstate32.status2,
X1 = (X0 bxor (X0 bsl ?TINYMT32_SH0)) band ?TINYMT32_UINT32,
Y1 = Y0 bxor (Y0 bsr ?TINYMT32_SH0) bxor X1,
S0 = R#intstate32.status1,
Expand All @@ -120,7 +120,7 @@ next_state(R) ->
temper(R) ->
T0 = R#intstate32.status3,
T1 = (R#intstate32.status0 + (R#intstate32.status2 bsr ?TINYMT32_SH8))
band ?TINYMT32_UINT32,
band ?TINYMT32_UINT32,
T2 = T0 bxor T1,
T1M = (-(T1 band 1)) band ?TINYMT32_UINT32,
T2 bxor (R#intstate32.tmat band T1M).
Expand Down

0 comments on commit 384a70b

Please sign in to comment.