From 9b6b0c35cd18d4178e93193e18041ae5b9da6335 Mon Sep 17 00:00:00 2001 From: niart120 <38847256+niart120@users.noreply.github.com> Date: Mon, 10 Jan 2022 06:02:27 +0900 Subject: [PATCH 1/2] fixed prev method --- src/xorshift.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xorshift.py b/src/xorshift.py index b56a7d3..96a406a 100644 --- a/src/xorshift.py +++ b/src/xorshift.py @@ -27,6 +27,8 @@ class Xorshift(object): t = s2 >> 19 ^ s2 ^ s3 t ^= t >> 8 + t ^= t >> 16 + t ^= t << 11 & 0xFFFFFFFF t ^= t << 22 & 0xFFFFFFFF From 1090f9d0d917258bcef1ee25e3f720694dda46a4 Mon Sep 17 00:00:00 2001 From: niart120 <38847256+niart120@users.noreply.github.com> Date: Mon, 10 Jan 2022 06:08:06 +0900 Subject: [PATCH 2/2] fixed advances --- src/xorshift.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xorshift.py b/src/xorshift.py index 96a406a..c1bf4f0 100644 --- a/src/xorshift.py +++ b/src/xorshift.py @@ -40,7 +40,7 @@ class Xorshift(object): return self.w def advances(self,length:int): - self.getNextRandSequence(self) + self.getNextRandSequence(length) def range(self,mi:int,ma:int)->int: """generate random integer value in [mi,ma)