Skip to content

Commit c5fe33e

Browse files
Sheppard, KevinSheppard, Kevin
authored andcommitted
FIX: Improve init of mrg32k3a
1 parent b79f304 commit c5fe33e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

randomstate/shims/mrg32k3a/mrg32k3a-shim.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ inline void entropy_init(aug_state* state)
5858
for (i = 0; i<6; i++)
5959
{
6060
val = (i < 3) ? STATE_MAX_VALUE_1 : STATE_MAX_VALUE_2;
61-
seeds[i] = (int64_t)((buf[i] < val) ? buf[i] : (buf[i] / 2) + 1);
61+
seeds[i] = (int64_t)(buf[i] % val);
6262
all_zero = all_zero || (seeds[i] > 0);
6363
}
6464
}

0 commit comments

Comments
 (0)