* Set lcg48 default seed_index for user's reference

master
Wirawan Purwanto 11 years ago
parent 42fdcc5253
commit 2907b2ca77
  1. 1
      math/random/rng_lcg48.py

@ -22,6 +22,7 @@ class lcg48(rng_base):
# This is "seed 1" in the legacy rannyu seed library. # This is "seed 1" in the legacy rannyu seed library.
L = 127 L = 127
n = 11863279 n = 11863279
seed_index = 1
div_two_48 = 2.0**(-48) div_two_48 = 2.0**(-48)
def __call__(self): def __call__(self):
L_new = (self.m * self.L + self.n) & 0xFFFFFFFFFFFF L_new = (self.m * self.L + self.n) & 0xFFFFFFFFFFFF

Loading…
Cancel
Save